Home / Function/ doReadMessages() — netty Function Reference

doReadMessages() — netty Function Reference

Architecture documentation for the doReadMessages() function in NioServerSocketChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  660f2254_9ae0_a8b7_1026_89b5852d6d76["doReadMessages()"]
  e7b7a902_9251_18bd_7763_ecbf802f4d1f["NioServerSocketChannel"]
  660f2254_9ae0_a8b7_1026_89b5852d6d76 -->|defined in| e7b7a902_9251_18bd_7763_ecbf802f4d1f
  style 660f2254_9ae0_a8b7_1026_89b5852d6d76 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/socket/nio/NioServerSocketChannel.java lines 156–176

    @Override
    protected int doReadMessages(List<Object> buf) throws Exception {
        SocketChannel ch = SocketUtils.accept(javaChannel());

        try {
            if (ch != null) {
                buf.add(new NioSocketChannel(this, ch));
                return 1;
            }
        } catch (Throwable t) {
            logger.warn("Failed to create a new channel from an accepted socket.", t);

            try {
                ch.close();
            } catch (Throwable t2) {
                logger.warn("Failed to close a socket.", t2);
            }
        }

        return 0;
    }

Domain

Subdomains

Frequently Asked Questions

What does doReadMessages() do?
doReadMessages() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/socket/nio/NioServerSocketChannel.java.
Where is doReadMessages() defined?
doReadMessages() is defined in transport/src/main/java/io/netty/channel/socket/nio/NioServerSocketChannel.java at line 156.

Analyze Your Own Codebase

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

Try Supermodel Free