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
FieldsModifier and TypeFieldDescriptionstatic final intprotected final RouterContextprotected final Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConnect(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.booleancanConnect(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.booleancanConnect(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.intOur inbound mask.intOur outbound mask.protected booleanIs NTCP disabled?protected booleanIs 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
-