Package net.i2p.i2ptunnel.socks
Class SOCKSHeader
java.lang.Object
net.i2p.i2ptunnel.socks.SOCKSHeader
Save the SOCKS header from a datagram
 Ref: RFC 1928
- Author:
 - zzz
 
- 
Constructor Summary
ConstructorsConstructorDescriptionSOCKSHeader(byte[] data) SOCKSHeader(Destination dest, int port) Make a dummy header from a dest, for those cases where we want to receive unsolicited datagrams. - 
Method Summary
 
- 
Constructor Details
- 
SOCKSHeader
public SOCKSHeader(byte[] data) - Parameters:
 data- the whole packet- Throws:
 IllegalArgumentException- on bad socks format
 - 
SOCKSHeader
Make a dummy header from a dest, for those cases where we want to receive unsolicited datagrams. Unused for now.- Parameters:
 port- I2CP port 0-65535- Since:
 - 0.9.53 add port param
 
 
 - 
 - 
Method Details
- 
getHost
As of 0.9.53, returns IP address as a string for address types 1 and 4.- Returns:
 - hostname or null for unknown address type
 
 - 
getPort
public int getPort()- Returns:
 - 0 - 65535
 - Since:
 - 0.9.53
 
 - 
getDestination
- Returns:
 - destination or null
 
 - 
getBytes
public byte[] getBytes() 
 -