Class RemoteHostId

java.lang.Object
net.i2p.router.transport.udp.RemoteHostId

final class RemoteHostId extends Object
Unique ID for a peer - its IP + port, all bundled into a tidy obj. If the remote peer is not reachable through an IP+port, this contains the hash of their identity.
  • Constructor Details

    • RemoteHostId

      public RemoteHostId(byte[] ip, int port)
      direct
    • RemoteHostId

      public RemoteHostId(Hash peerHash)
      indirect
  • Method Details

    • getIP

      public byte[] getIP()
      Returns:
      null if indirect
    • getPort

      public int getPort()
      Returns:
      0 if indirect
    • getPeerHash

      public Hash getPeerHash()
      Returns:
      null if direct
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object