Home / Function/ respond() — netty Function Reference

respond() — netty Function Reference

Architecture documentation for the respond() function in CorsHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  83580d6f_fb90_ca67_d975_fcbf1311a55f["respond()"]
  48d2af19_d0e9_a2f5_8280_607eb2335be4["CorsHandler"]
  83580d6f_fb90_ca67_d975_fcbf1311a55f -->|defined in| 48d2af19_d0e9_a2f5_8280_607eb2335be4
  a3528954_dd41_114c_963f_7d9056bea918["handlePreflight()"]
  a3528954_dd41_114c_963f_7d9056bea918 -->|calls| 83580d6f_fb90_ca67_d975_fcbf1311a55f
  6746e34a_f660_cdc7_e5ca_2bbc073582b0["forbidden()"]
  6746e34a_f660_cdc7_e5ca_2bbc073582b0 -->|calls| 83580d6f_fb90_ca67_d975_fcbf1311a55f
  style 83580d6f_fb90_ca67_d975_fcbf1311a55f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsHandler.java lines 274–287

    private static void respond(
            final ChannelHandlerContext ctx,
            final HttpRequest request,
            final HttpResponse response) {

        final boolean keepAlive = HttpUtil.isKeepAlive(request);

        HttpUtil.setKeepAlive(response, keepAlive);

        final ChannelFuture future = ctx.writeAndFlush(response);
        if (!keepAlive) {
            future.addListener(ChannelFutureListener.CLOSE);
        }
    }

Subdomains

Frequently Asked Questions

What does respond() do?
respond() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsHandler.java.
Where is respond() defined?
respond() is defined in codec-http/src/main/java/io/netty/handler/codec/http/cors/CorsHandler.java at line 274.
What calls respond()?
respond() is called by 2 function(s): forbidden, handlePreflight.

Analyze Your Own Codebase

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

Try Supermodel Free