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.

### Constructor Summary

Constructors
Constructor and Description
`RemoteHostId(byte[] peerHash)`
`RemoteHostId(byte[] ip, int port)`

### Method Summary

Methods
`boolean` `equals(Object obj)`
`byte[]` `getIP()`
`byte[]` `getPeerHash()`
`int` `getPort()`
`int` `hashCode()`
`String` `toHostString()`
`String` `toString()`
`String` `toString(boolean includePort)`
`static String` `toString(byte[] ip)`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### RemoteHostId

    public RemoteHostId(byte[] ip,
                int port)

#### RemoteHostId

    public RemoteHostId(byte[] peerHash)

### Method Detail

#### 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()