Package net.i2p.router.tunnel.pool
Class ConnectChecker
java.lang.Object
net.i2p.router.tunnel.pool.ConnectChecker
- Direct Known Subclasses:
TunnelPeerSelector
Tools to check transport compatibility.
- Since:
- 0.9.34
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
protected final RouterContext
protected final Log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
(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
(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
Our inbound mask.int
Our outbound mask.protected boolean
Is NTCP disabled?protected boolean
Is SSU disabled?
-
Field Details
-
ctx
-
log
-
ANY_V4
public static final int ANY_V4- See Also:
-
-
Constructor Details
-
ConnectChecker
-
-
Method Details
-
isNTCPDisabled
protected boolean isNTCPDisabled()Is NTCP disabled?- Since:
- 0.9.34
-
isSSUDisabled
protected boolean isSSUDisabled()Is SSU disabled?- Since:
- 0.9.34
-
canConnect
Can "from" connect to "to" based on published addresses? This is intended for tunnel candidates, where we already have the RI. Will not force RI lookups. Either from or to may be us. This is best effort, as we can't know for sure. Published addresses or introducers may have changed. Even if a can't connect to b, they may already be connected as b connected to a.- Returns:
- true if we don't have either RI
- Since:
- 0.9.34
-
canConnect
Can we connect to "to" based on published addresses? This is intended for tunnel candidates, where we already have the RI. Will not force RI lookups. This is best effort, as we can't know for sure. Does not check isEstablished(); do that first.- Since:
- 0.9.34
-
canConnect
Can "from" connect to us based on published addresses? This is intended for tunnel candidates, where we already have the RI. Will not force RI lookups. This is best effort, as we can't know for sure. Does not check isEstablished(); do that first.- Since:
- 0.9.34
-
getInboundMask
Our inbound mask. For most cases, we use what we published, i.e. getConnectMask()- Returns:
- bitmask for accepting connections
- Since:
- 0.9.34
-
getOutboundMask
Our outbound mask. For most cases, we use our comm system status.- Returns:
- bitmask for initiating connections
- Since:
- 0.9.34
-