WebSocketVersion Type — netty Architecture
Architecture documentation for the WebSocketVersion type/interface in WebSocketVersion.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d1f336dc_4596_20ad_1d9a_d89b7dbe3d19["WebSocketVersion"] 86a321e9_865a_cd0c_1e66_f9a1aafb764a["WebSocketVersion.java"] d1f336dc_4596_20ad_1d9a_d89b7dbe3d19 -->|defined in| 86a321e9_865a_cd0c_1e66_f9a1aafb764a style d1f336dc_4596_20ad_1d9a_d89b7dbe3d19 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketVersion.java lines 30–77
public enum WebSocketVersion {
UNKNOWN(AsciiString.cached(StringUtil.EMPTY_STRING)),
/**
* <a href= "https://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00"
* >draft-ietf-hybi-thewebsocketprotocol- 00</a>.
*/
V00(AsciiString.cached("0")),
/**
* <a href= "https://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07"
* >draft-ietf-hybi-thewebsocketprotocol- 07</a>
*/
V07(AsciiString.cached("7")),
/**
* <a href= "https://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10"
* >draft-ietf-hybi-thewebsocketprotocol- 10</a>
*/
V08(AsciiString.cached("8")),
/**
* <a href="https://tools.ietf.org/html/rfc6455 ">RFC 6455</a>. This was originally <a href=
* "https://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17" >draft-ietf-hybi-thewebsocketprotocol-
* 17</a>
*/
V13(AsciiString.cached("13"));
private final AsciiString headerValue;
WebSocketVersion(AsciiString headerValue) {
this.headerValue = headerValue;
}
/**
* @return Value for HTTP Header 'Sec-WebSocket-Version'
*/
public String toHttpHeaderValue() {
return toAsciiString().toString();
}
AsciiString toAsciiString() {
if (this == UNKNOWN) {
// Let's special case this to preserve behaviour
throw new IllegalStateException("Unknown web socket version: " + this);
}
return headerValue;
}
}
Source
Frequently Asked Questions
What is the WebSocketVersion type?
WebSocketVersion is a type/interface in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketVersion.java.
Where is WebSocketVersion defined?
WebSocketVersion is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketVersion.java at line 30.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free