Home / Function/ sendResponse() — netty Function Reference

sendResponse() — netty Function Reference

Architecture documentation for the sendResponse() function in StompWebSocketClientPageHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f59e6f53_60f4_c71f_4c56_9c745733d169["sendResponse()"]
  b42dfc71_9168_e756_15f4_7d0276b026db["StompWebSocketClientPageHandler"]
  f59e6f53_60f4_c71f_4c56_9c745733d169 -->|defined in| b42dfc71_9168_e756_15f4_7d0276b026db
  a2c90322_aea7_93db_a3b3_6c785b6a2668["channelRead0()"]
  a2c90322_aea7_93db_a3b3_6c785b6a2668 -->|calls| f59e6f53_60f4_c71f_4c56_9c745733d169
  1347a6f5_daf3_a657_75a5_08dccb979171["sendResource()"]
  1347a6f5_daf3_a657_75a5_08dccb979171 -->|calls| f59e6f53_60f4_c71f_4c56_9c745733d169
  style f59e6f53_60f4_c71f_4c56_9c745733d169 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/stomp/websocket/StompWebSocketClientPageHandler.java lines 131–145

    private static void sendResponse(HttpResponse response, ChannelHandlerContext ctx, boolean autoFlush) {
        if (HttpUtil.isKeepAlive(response)) {
            if (response.protocolVersion().equals(HTTP_1_0)) {
                response.headers().set(CONNECTION, KEEP_ALIVE);
            }
            ctx.write(response);
        } else {
            response.headers().set(CONNECTION, CLOSE);
            ctx.write(response).addListener(ChannelFutureListener.CLOSE);
        }

        if (autoFlush) {
            ctx.flush();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does sendResponse() do?
sendResponse() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/stomp/websocket/StompWebSocketClientPageHandler.java.
Where is sendResponse() defined?
sendResponse() is defined in example/src/main/java/io/netty/example/stomp/websocket/StompWebSocketClientPageHandler.java at line 131.
What calls sendResponse()?
sendResponse() is called by 2 function(s): channelRead0, sendResource.

Analyze Your Own Codebase

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

Try Supermodel Free