Home / Type/ SocksProtocolVersion Type — netty Architecture

SocksProtocolVersion Type — netty Architecture

Architecture documentation for the SocksProtocolVersion type/interface in SocksProtocolVersion.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  7a5c8eb4_5446_d5ce_1686_af4668bb6927["SocksProtocolVersion"]
  6e717989_b1c1_a4d1_daa7_44ef428d3fba["SocksProtocolVersion.java"]
  7a5c8eb4_5446_d5ce_1686_af4668bb6927 -->|defined in| 6e717989_b1c1_a4d1_daa7_44ef428d3fba
  style 7a5c8eb4_5446_d5ce_1686_af4668bb6927 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-socks/src/main/java/io/netty/handler/codec/socks/SocksProtocolVersion.java lines 19–50

public enum SocksProtocolVersion {
    SOCKS4a((byte) 0x04),
    SOCKS5((byte) 0x05),
    UNKNOWN((byte) 0xff);

    private final byte b;

    SocksProtocolVersion(byte b) {
        this.b = b;
    }

    /**
     * @deprecated Use {@link #valueOf(byte)} instead.
     */
    @Deprecated
    public static SocksProtocolVersion fromByte(byte b) {
        return valueOf(b);
    }

    public static SocksProtocolVersion valueOf(byte b) {
        for (SocksProtocolVersion code : values()) {
            if (code.b == b) {
                return code;
            }
        }
        return UNKNOWN;
    }

    public byte byteValue() {
        return b;
    }
}

Frequently Asked Questions

What is the SocksProtocolVersion type?
SocksProtocolVersion is a type/interface in the netty codebase, defined in codec-socks/src/main/java/io/netty/handler/codec/socks/SocksProtocolVersion.java.
Where is SocksProtocolVersion defined?
SocksProtocolVersion is defined in codec-socks/src/main/java/io/netty/handler/codec/socks/SocksProtocolVersion.java at line 19.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free