net.i2p.router.transport.udp
Class RemoteHostId
java.lang.Object
net.i2p.router.transport.udp.RemoteHostId
final class RemoteHostId
- extends java.lang.Object
Unique ID for a peer - its IP + port, all bundled into a tidy obj.
If the remote peer is not reachabe through an IP+port, this contains
the hash of their identity.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
RemoteHostId
public RemoteHostId(byte[] ip,
int port)
RemoteHostId
public RemoteHostId(byte[] peerHash)
getIP
public byte[] getIP()
getPort
public int getPort()
getPeerHash
public byte[] getPeerHash()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toString
public java.lang.String toString(boolean includePort)
toString
public static java.lang.String toString(byte[] ip)
toHostString
public java.lang.String toHostString()