Class ConnectChecker

java.lang.Object
net.i2p.router.tunnel.pool.ConnectChecker
Direct Known Subclasses:
TunnelPeerSelector

public class ConnectChecker extends Object
Tools to check transport compatibility.
Since:
0.9.34
  • Field Details

  • Constructor Details

  • 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

      public 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. 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

      public 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. 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

      public 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. 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

      public int getInboundMask(RouterInfo us)
      Our inbound mask. For most cases, we use what we published, i.e. getConnectMask()
      Returns:
      bitmask for accepting connections
      Since:
      0.9.34
    • getOutboundMask

      public int getOutboundMask(RouterInfo us)
      Our outbound mask. For most cases, we use our comm system status.
      Returns:
      bitmask for initiating connections
      Since:
      0.9.34