connect() — netty Function Reference
Architecture documentation for the connect() function in AbstractOioChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 98234df0_5e69_0926_a309_1621df1ac44d["connect()"] 1adb1602_1747_0e17_60a4_9ff33e43586f["DefaultOioUnsafe"] 98234df0_5e69_0926_a309_1621df1ac44d -->|defined in| 1adb1602_1747_0e17_60a4_9ff33e43586f 4ca5a077_b0dc_41f5_8ddb_91dd62fafa97["doConnect()"] 98234df0_5e69_0926_a309_1621df1ac44d -->|calls| 4ca5a077_b0dc_41f5_8ddb_91dd62fafa97 style 98234df0_5e69_0926_a309_1621df1ac44d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/oio/AbstractOioChannel.java lines 64–88
@Override
public void connect(
final SocketAddress remoteAddress,
final SocketAddress localAddress, final ChannelPromise promise) {
if (!promise.setUncancellable() || !ensureOpen(promise)) {
return;
}
try {
boolean wasActive = isActive();
doConnect(remoteAddress, localAddress);
// Get the state as trySuccess() may trigger an ChannelFutureListener that will close the Channel.
// We still need to ensure we call fireChannelActive() in this case.
boolean active = isActive();
safeSetSuccess(promise);
if (!wasActive && active) {
pipeline().fireChannelActive();
}
} catch (Throwable t) {
safeSetFailure(promise, annotateConnectException(t, remoteAddress));
closeIfClosed();
}
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does connect() do?
connect() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/oio/AbstractOioChannel.java.
Where is connect() defined?
connect() is defined in transport/src/main/java/io/netty/channel/oio/AbstractOioChannel.java at line 64.
What does connect() call?
connect() calls 1 function(s): doConnect.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free