GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Overview
  • Use
  • Tree
  • Deprecated
  • Index
  • Search
  • Help
  • io.netty.handler.codec.socks
  • SocksCmdResponse

This view

  • Original page
  • New address

GeezerVison is showing netty.io — SocksCmdResponse (Netty API Reference (4.1.141.Final))

Class SocksCmdResponse

java.lang.Object
io.netty.handler.codec.socks.SocksMessage
io.netty.handler.codec.socks.SocksResponse
io.netty.handler.codec.socks.SocksCmdResponse

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

    Constructors
    Constructor
    Description
    SocksCmdResponse(SocksCmdStatus cmdStatus, SocksAddressType addressType)
     
    SocksCmdResponse(SocksCmdStatus cmdStatus, SocksAddressType addressType, String host, int port)
    Constructs new response and includes provided host and port as part of it.
  • Method Summary

    Modifier and Type
    Method
    Description
    SocksAddressType
    addressType()
    Returns the SocksAddressType of this SocksCmdResponse
    SocksCmdStatus
    cmdStatus()
    Returns the SocksCmdStatus of this SocksCmdResponse
    void
    encodeAsByteBuf(ByteBuf byteBuf)
     
    String
    host()
    Returns host that is used as a parameter in SocksCmdType.
    int
    port()
    Returns port that is used as a parameter in SocksCmdType.

    Methods inherited from class SocksResponse

    responseType
    Modifier and Type
    Method
    Description
    SocksResponseType
    responseType()
    Returns socks response type

    Methods inherited from class SocksMessage

    protocolVersion, type
    Modifier and Type
    Method
    Description
    SocksProtocolVersion
    protocolVersion()
    Returns the SocksProtocolVersion of this SocksMessage
    SocksMessageType
    type()
    Returns the SocksMessageType of this SocksMessage

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      • IDN.toASCII(String)
  • Method Details

    • cmdStatus

      public SocksCmdStatus cmdStatus()
      Returns the SocksCmdStatus of this SocksCmdResponse
      Returns:
      The SocksCmdStatus of this SocksCmdResponse
    • addressType

      public SocksAddressType addressType()
      Returns the SocksAddressType of this SocksCmdResponse
      Returns:
      The SocksAddressType of this SocksCmdResponse
    • host

      public String 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
    • encodeAsByteBuf

      public void encodeAsByteBuf(ByteBuf byteBuf)
      Specified by:
      encodeAsByteBuf in class SocksMessage
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.