net.i2p.router.transport.udp
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 reachabe through an IP+port, this contains
the hash of their identity.
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 Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
toString
public String toString(boolean includePort)
toString
public static String toString(byte[] ip)
toHostString
public String toHostString()