handshake() — netty Function Reference
Architecture documentation for the handshake() function in SslHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b58a530d_e555_4c6b_6ad0_658b1ae0022d["handshake()"] d8b07a7c_44f8_c4e9_efe8_49bfae7d4af1["SslHandler"] b58a530d_e555_4c6b_6ad0_658b1ae0022d -->|defined in| d8b07a7c_44f8_c4e9_efe8_49bfae7d4af1 998f059b_4088_3c69_760d_e33e2b688238["startHandshakeProcessing()"] 998f059b_4088_3c69_760d_e33e2b688238 -->|calls| b58a530d_e555_4c6b_6ad0_658b1ae0022d 007985bc_62e0_78a1_886e_513422ed7cfe["renegotiateOnEventLoop()"] 007985bc_62e0_78a1_886e_513422ed7cfe -->|calls| b58a530d_e555_4c6b_6ad0_658b1ae0022d 84166f3c_84f7_55f8_1980_b35bfbbc884d["channelActive()"] b58a530d_e555_4c6b_6ad0_658b1ae0022d -->|calls| 84166f3c_84f7_55f8_1980_b35bfbbc884d c5a95111_bf75_eef9_82e9_d3b52fb23759["flush()"] b58a530d_e555_4c6b_6ad0_658b1ae0022d -->|calls| c5a95111_bf75_eef9_82e9_d3b52fb23759 71a6adcb_d0db_07c9_5701_1fb195ac1065["connect()"] b58a530d_e555_4c6b_6ad0_658b1ae0022d -->|calls| 71a6adcb_d0db_07c9_5701_1fb195ac1065 5759ad29_b25e_dc08_15d9_5d7a84356f31["wrapNonAppData()"] b58a530d_e555_4c6b_6ad0_658b1ae0022d -->|calls| 5759ad29_b25e_dc08_15d9_5d7a84356f31 23ca304b_58b0_41b7_c5ca_0810728d5ede["setHandshakeFailure()"] b58a530d_e555_4c6b_6ad0_658b1ae0022d -->|calls| 23ca304b_58b0_41b7_c5ca_0810728d5ede 97e069a2_d061_156b_5f87_33bbcfd62f59["forceFlush()"] b58a530d_e555_4c6b_6ad0_658b1ae0022d -->|calls| 97e069a2_d061_156b_5f87_33bbcfd62f59 style b58a530d_e555_4c6b_6ad0_658b1ae0022d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/SslHandler.java lines 2252–2279
private void handshake(boolean flushAtEnd) {
if (engine.getHandshakeStatus() != HandshakeStatus.NOT_HANDSHAKING) {
// Not all SSLEngine implementations support calling beginHandshake multiple times while a handshake
// is in progress. See https://github.com/netty/netty/issues/4718.
return;
}
if (handshakePromise.isDone()) {
// If the handshake is done already lets just return directly as there is no need to trigger it again.
// This can happen if the handshake(...) was triggered before we called channelActive(...) by a
// flush() that was triggered by a ChannelFutureListener that was added to the ChannelFuture returned
// from the connect(...) method. In this case we will see the flush() happen before we had a chance to
// call fireChannelActive() on the pipeline.
return;
}
// Begin handshake.
final ChannelHandlerContext ctx = this.ctx;
try {
engine.beginHandshake();
wrapNonAppData(ctx, false);
} catch (Throwable e) {
setHandshakeFailure(ctx, e);
} finally {
if (flushAtEnd) {
forceFlush(ctx);
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does handshake() do?
handshake() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java.
Where is handshake() defined?
handshake() is defined in handler/src/main/java/io/netty/handler/ssl/SslHandler.java at line 2252.
What does handshake() call?
handshake() calls 6 function(s): channelActive, connect, flush, forceFlush, setHandshakeFailure, wrapNonAppData.
What calls handshake()?
handshake() is called by 2 function(s): renegotiateOnEventLoop, startHandshakeProcessing.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free