public class ConnectChecker extends Object
| Modifier and Type | Field and Description |
|---|---|
static int | ANY_V4any IPv4 transport |
protected RouterContext | ctxthe router context |
protected Log | logthe logger |
| Constructor and Description |
|---|
ConnectChecker(RouterContext context)Create a new ConnectChecker. |
| Modifier and Type | Method and Description |
|---|---|
boolean | canConnect(Hash from,
Hash to)Can "from" connect to "to" based on published addresses?
This is intended for tunnel candidates, where we already have
the RI. |
boolean | canConnect(int ourMask,
RouterInfo to)Can we connect to "to" based on published addresses?
This is intended for tunnel candidates, where we already have
the RI. |
boolean | canConnect(RouterInfo from,
int ourMask)Can "from" connect to us based on published addresses?
This is intended for tunnel candidates, where we already have
the RI. |
int | getInboundMask(RouterInfo us)Our inbound mask. |
int | getOutboundMask(RouterInfo us)Our outbound mask. |
protected boolean | isNTCPDisabled()Is NTCP disabled? |
protected boolean | isSSUDisabled()Is SSU disabled? |
public static final int ANY_V4
protected final RouterContext ctx
protected final Log log
public ConnectChecker(RouterContext context)
context - the router contextpublic boolean canConnect(Hash from, Hash to)
from - the source router hashto - the destination router hashpublic boolean canConnect(int ourMask,
RouterInfo to)ourMask - our connection maskto - the destination router infopublic boolean canConnect(RouterInfo from, int ourMask)
from - the source router infoourMask - our connection maskpublic int getInboundMask(RouterInfo us)
us - our router infopublic int getOutboundMask(RouterInfo us)
us - our router infoprotected boolean isNTCPDisabled()
protected boolean isSSUDisabled()