Home / Function/ String() — netty Function Reference

String() — netty Function Reference

Architecture documentation for the String() function in WebSocketServerProtocolHandshakeHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  fdfa0574_1ebf_0a28_2d09_a6a40759b030["String()"]
  7859e8c2_d3fe_97c8_edc5_e54ff6dd5668["WebSocketServerProtocolHandshakeHandler"]
  fdfa0574_1ebf_0a28_2d09_a6a40759b030 -->|defined in| 7859e8c2_d3fe_97c8_edc5_e54ff6dd5668
  style fdfa0574_1ebf_0a28_2d09_a6a40759b030 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java lines 130–138

    private static String getWebSocketLocation(ChannelPipeline cp, HttpRequest req, String path) {
        String protocol = "ws";
        if (cp.get(SslHandler.class) != null) {
            // SSL in use so use Secure WebSockets
            protocol = "wss";
        }
        String host = req.headers().get(HttpHeaderNames.HOST);
        return protocol + "://" + host + path;
    }

Subdomains

Frequently Asked Questions

What does String() do?
String() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java.
Where is String() defined?
String() is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandshakeHandler.java at line 130.

Analyze Your Own Codebase

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

Try Supermodel Free