SocksCmdRequest() — netty Function Reference
Architecture documentation for the SocksCmdRequest() function in SocksCmdRequest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 2330fb6f_df29_2258_5359_27aebc146558["SocksCmdRequest()"] 4c77f215_7f5b_19c4_455f_987dda36774c["SocksCmdRequest"] 2330fb6f_df29_2258_5359_27aebc146558 -->|defined in| 4c77f215_7f5b_19c4_455f_987dda36774c style 2330fb6f_df29_2258_5359_27aebc146558 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-socks/src/main/java/io/netty/handler/codec/socks/SocksCmdRequest.java lines 38–72
public SocksCmdRequest(SocksCmdType cmdType, SocksAddressType addressType, String host, int port) {
super(SocksRequestType.CMD);
ObjectUtil.checkNotNull(cmdType, "cmdType");
ObjectUtil.checkNotNull(addressType, "addressType");
ObjectUtil.checkNotNull(host, "host");
switch (addressType) {
case IPv4:
if (!NetUtil.isValidIpV4Address(host)) {
throw new IllegalArgumentException(host + " is not a valid IPv4 address");
}
break;
case DOMAIN:
String asciiHost = IDN.toASCII(host);
if (asciiHost.length() > 255) {
throw new IllegalArgumentException(host + " IDN: " + asciiHost + " exceeds 255 char limit");
}
host = asciiHost;
break;
case IPv6:
if (!NetUtil.isValidIpV6Address(host)) {
throw new IllegalArgumentException(host + " is not a valid IPv6 address");
}
break;
case UNKNOWN:
break;
}
if (port <= 0 || port >= 65536) {
throw new IllegalArgumentException(port + " is not in bounds 0 < x < 65536");
}
this.cmdType = cmdType;
this.addressType = addressType;
this.host = host;
this.port = port;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does SocksCmdRequest() do?
SocksCmdRequest() is a function in the netty codebase, defined in codec-socks/src/main/java/io/netty/handler/codec/socks/SocksCmdRequest.java.
Where is SocksCmdRequest() defined?
SocksCmdRequest() is defined in codec-socks/src/main/java/io/netty/handler/codec/socks/SocksCmdRequest.java at line 38.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free