GeezerVison is showing netty.io — SocksCmdResponse (Netty API Reference (4.1.141.Final))
Class SocksCmdResponse
A socks cmd response.
- See Also:
-
-
Constructor Summary
Constructors
Constructor
Description
Constructs new response and includes provided host and port as part of it.
-
Method Summary
Modifier and Type
Method
Description
void
int
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
-
SocksCmdResponse
Constructs new response and includes provided host and port as part of it.
- Parameters:
cmdStatus - status of the response
addressType - type of host parameter
host - host (BND.ADDR field) is address that server used when connecting to the target host.
When null a value of 4/8 0x00 octets will be used for IPv4/IPv6 and a single 0x00 byte will be
used for domain addressType. Value is converted to ASCII using IDN.toASCII(String).
port - port (BND.PORT field) that the server assigned to connect to the target host
- Throws:
NullPointerException - in case cmdStatus or addressType are missing
IllegalArgumentException - in case host or port cannot be validated
- See Also:
-
-
Method Details
-
-
-
host
Returns host that is used as a parameter in
SocksCmdType.
Host (BND.ADDR field in response) is address that server used when connecting to the target host.
This is typically different from address which client uses to connect to the SOCKS server.
- Returns:
- host that is used as a parameter in
SocksCmdType
or null when there was no host specified during response construction
-
port
public int port()
Returns port that is used as a parameter in
SocksCmdType.
Port (BND.PORT field in response) is port that the server assigned to connect to the target host.
- Returns:
- port that is used as a parameter in
SocksCmdType
-