doConnect() — netty Function Reference
Architecture documentation for the doConnect() function in AbstractKQueueChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 67f1ad2f_19a6_0305_1eca_74e51248ffcb["doConnect()"] e50a36fb_84e6_15bc_5dc3_edd4246018f8["AbstractKQueueChannel"] 67f1ad2f_19a6_0305_1eca_74e51248ffcb -->|defined in| e50a36fb_84e6_15bc_5dc3_edd4246018f8 bbd7c9c1_c4bc_de70_f8db_d09f08d2b040["connect()"] bbd7c9c1_c4bc_de70_f8db_d09f08d2b040 -->|calls| 67f1ad2f_19a6_0305_1eca_74e51248ffcb 4e80e00d_500c_e8f4_951b_8efe3c471892["checkResolvable()"] 67f1ad2f_19a6_0305_1eca_74e51248ffcb -->|calls| 4e80e00d_500c_e8f4_951b_8efe3c471892 bbd7c9c1_c4bc_de70_f8db_d09f08d2b040["connect()"] 67f1ad2f_19a6_0305_1eca_74e51248ffcb -->|calls| bbd7c9c1_c4bc_de70_f8db_d09f08d2b040 40290e34_2d02_2ca4_f99e_abc7767dd285["doConnect0()"] 67f1ad2f_19a6_0305_1eca_74e51248ffcb -->|calls| 40290e34_2d02_2ca4_f99e_abc7767dd285 style 67f1ad2f_19a6_0305_1eca_74e51248ffcb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java lines 704–736
protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception {
if (localAddress instanceof InetSocketAddress) {
checkResolvable((InetSocketAddress) localAddress);
}
InetSocketAddress remoteSocketAddr = remoteAddress instanceof InetSocketAddress
? (InetSocketAddress) remoteAddress : null;
if (remoteSocketAddr != null) {
checkResolvable(remoteSocketAddr);
}
if (remote != null) {
// Check if already connected before trying to connect. This is needed as connect(...) will not return -1
// and set errno to EISCONN if a previous connect(...) attempt was setting errno to EINPROGRESS and finished
// later.
throw new AlreadyConnectedException();
}
if (localAddress != null) {
socket.bind(localAddress);
}
boolean connected = doConnect0(remoteAddress, localAddress);
if (connected) {
remote = remoteSocketAddr == null?
remoteAddress : computeRemoteAddr(remoteSocketAddr, socket.remoteAddress());
}
// We always need to set the localAddress even if not connected yet as the bind already took place.
//
// See https://github.com/netty/netty/issues/3463
local = socket.localAddress();
return connected;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does doConnect() do?
doConnect() is a function in the netty codebase, defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java.
Where is doConnect() defined?
doConnect() is defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/AbstractKQueueChannel.java at line 704.
What does doConnect() call?
doConnect() calls 3 function(s): checkResolvable, connect, doConnect0.
What calls doConnect()?
doConnect() is called by 1 function(s): connect.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free