Enum SocksVersion

java.lang.Object
java.lang.Enum<SocksVersion>
io.netty.handler.codec.socksx.SocksVersion
All Implemented Interfaces:
Serializable, Comparable<SocksVersion>, java.lang.constant.Constable

public enum SocksVersion extends Enum<SocksVersion>
The version of SOCKS protocol.
  • Enum Constant Details

    • SOCKS4a

      public static final SocksVersion SOCKS4a
      SOCKS protocol version 4a (or 4)
    • SOCKS5

      public static final SocksVersion SOCKS5
      SOCKS protocol version 5
    • UNKNOWN

      public static final SocksVersion UNKNOWN
      Unknown protocol version
  • Field Details

    • b

      private final byte b
  • Constructor Details

    • SocksVersion

      private SocksVersion(byte b)
  • Method Details

    • values

      public static SocksVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SocksVersion valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static SocksVersion valueOf(byte b)
      Returns the SocksVersion that corresponds to the specified version field value, as defined in the protocol specification.
      Returns:
      UNKNOWN if the specified value does not represent a known SOCKS protocol version
    • byteValue

      public byte byteValue()
      Returns the value of the version field, as defined in the protocol specification.