doConnect() — netty Function Reference
Architecture documentation for the doConnect() function in OioSocketChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 86a3bc38_c0d2_e44c_4eaf_2aedb6e4c180["doConnect()"] c458e276_eaf3_4567_04e0_b5864fe60240["OioSocketChannel"] 86a3bc38_c0d2_e44c_4eaf_2aedb6e4c180 -->|defined in| c458e276_eaf3_4567_04e0_b5864fe60240 832f4fd5_08ee_a9da_8f65_4c19777b7d19["doClose()"] 86a3bc38_c0d2_e44c_4eaf_2aedb6e4c180 -->|calls| 832f4fd5_08ee_a9da_8f65_4c19777b7d19 style 86a3bc38_c0d2_e44c_4eaf_2aedb6e4c180 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/socket/oio/OioSocketChannel.java lines 294–317
@Override
protected void doConnect(SocketAddress remoteAddress,
SocketAddress localAddress) throws Exception {
if (localAddress != null) {
SocketUtils.bind(socket, localAddress);
}
final int connectTimeoutMillis = config().getConnectTimeoutMillis();
boolean success = false;
try {
SocketUtils.connect(socket, remoteAddress, connectTimeoutMillis);
activate(socket.getInputStream(), socket.getOutputStream());
success = true;
} catch (SocketTimeoutException e) {
ConnectTimeoutException cause = new ConnectTimeoutException("connection timed out after " +
connectTimeoutMillis + " ms: " + remoteAddress);
cause.setStackTrace(e.getStackTrace());
throw cause;
} finally {
if (!success) {
doClose();
}
}
}
Domain
Subdomains
Calls
Source
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/OioSocketChannel.java.
Where is doConnect() defined?
doConnect() is defined in transport/src/main/java/io/netty/channel/socket/oio/OioSocketChannel.java at line 294.
What does doConnect() call?
doConnect() calls 1 function(s): doClose.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free