Home / Function/ doConnect() — netty Function Reference

doConnect() — netty Function Reference

Architecture documentation for the doConnect() function in OioDatagramChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  062dc9e3_84e7_06c5_3f84_b3d9c43794e2["doConnect()"]
  a7905bd8_19b4_15f5_a2e6_da0e5df1cc1b["OioDatagramChannel"]
  062dc9e3_84e7_06c5_3f84_b3d9c43794e2 -->|defined in| a7905bd8_19b4_15f5_a2e6_da0e5df1cc1b
  style 062dc9e3_84e7_06c5_3f84_b3d9c43794e2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/socket/oio/OioDatagramChannel.java lines 178–198

    @Override
    protected void doConnect(SocketAddress remoteAddress,
            SocketAddress localAddress) throws Exception {
        if (localAddress != null) {
            socket.bind(localAddress);
        }

        boolean success = false;
        try {
            socket.connect(remoteAddress);
            success = true;
        } finally {
            if (!success) {
                try {
                    socket.close();
                } catch (Throwable t) {
                    logger.warn("Failed to close a socket.", t);
                }
            }
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does doConnect() do?
doConnect() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/socket/oio/OioDatagramChannel.java.
Where is doConnect() defined?
doConnect() is defined in transport/src/main/java/io/netty/channel/socket/oio/OioDatagramChannel.java at line 178.

Analyze Your Own Codebase

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

Try Supermodel Free