Package 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 reachable through an IP+port, this contains the hash of their identity.
-
-
Constructor Summary
Constructors Constructor Description RemoteHostId(byte[] ip, int port)
directRemoteHostId(Hash peerHash)
indirect
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
byte[]
getIP()
Hash
getPeerHash()
int
getPort()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
RemoteHostId
public RemoteHostId(byte[] ip, int port)
direct
-
RemoteHostId
public RemoteHostId(Hash peerHash)
indirect
-
-
Method Detail
-
getIP
public byte[] getIP()
- Returns:
- null if indirect
-
getPort
public int getPort()
- Returns:
- 0 if indirect
-
getPeerHash
public Hash getPeerHash()
- Returns:
- null if direct
-
-