Home / Function/ applyCloseSentTimeout() — netty Function Reference

applyCloseSentTimeout() — netty Function Reference

Architecture documentation for the applyCloseSentTimeout() function in WebSocketProtocolHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  bab512bf_e3c9_2d9c_23a0_307fbdc7e956["applyCloseSentTimeout()"]
  d25f6f34_2ca3_7948_600a_8eae12cd9427["WebSocketProtocolHandler"]
  bab512bf_e3c9_2d9c_23a0_307fbdc7e956 -->|defined in| d25f6f34_2ca3_7948_600a_8eae12cd9427
  791f6a38_ba17_97d5_517e_667c306cfa1d["close()"]
  791f6a38_ba17_97d5_517e_667c306cfa1d -->|calls| bab512bf_e3c9_2d9c_23a0_307fbdc7e956
  style bab512bf_e3c9_2d9c_23a0_307fbdc7e956 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketProtocolHandler.java lines 122–137

    private void applyCloseSentTimeout(ChannelHandlerContext ctx) {
        if (closeSent.isDone() || forceCloseTimeoutMillis < 0) {
            return;
        }

        final Future<?> timeoutTask = ctx.executor().schedule(new Runnable() {
            @Override
            public void run() {
                if (!closeSent.isDone()) {
                    closeSent.tryFailure(buildHandshakeException("send close frame timed out"));
                }
            }
        }, forceCloseTimeoutMillis, TimeUnit.MILLISECONDS);

        closeSent.addListener(future -> timeoutTask.cancel(false));
    }

Subdomains

Called By

Frequently Asked Questions

What does applyCloseSentTimeout() do?
applyCloseSentTimeout() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketProtocolHandler.java.
Where is applyCloseSentTimeout() defined?
applyCloseSentTimeout() is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketProtocolHandler.java at line 122.
What calls applyCloseSentTimeout()?
applyCloseSentTimeout() is called by 1 function(s): close.

Analyze Your Own Codebase

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

Try Supermodel Free