Class SocksCmdResponse


public final class SocksCmdResponse extends SocksResponse
A socks cmd response.
See Also:
  • Constructor Details

    • SocksCmdResponse

      public SocksCmdResponse(SocksCmdStatus cmdStatus, SocksAddressType addressType)
    • SocksCmdResponse

      public SocksCmdResponse(SocksCmdStatus cmdStatus, SocksAddressType addressType, String host, int port)
      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