public class ConnectChecker extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ANY_V4 |
protected RouterContext |
ctx |
protected Log |
log |
| Constructor and Description |
|---|
ConnectChecker(RouterContext context) |
| 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.
|
protected static int |
getConnectMask(Collection<RouterAddress> addrs) |
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)
public boolean canConnect(Hash from, Hash to)
public boolean canConnect(int ourMask,
RouterInfo to)
public boolean canConnect(RouterInfo from, int ourMask)
protected static int getConnectMask(Collection<RouterAddress> addrs)
addrs - non-empty, set your own default if emptypublic int getInboundMask(RouterInfo us)
public int getOutboundMask(RouterInfo us)
protected boolean isNTCPDisabled()
protected boolean isSSUDisabled()