exceptionCaught() — netty Function Reference
Architecture documentation for the exceptionCaught() function in PcapWriteHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 8bb104b3_dbc0_68f9_712f_44217e20e914["exceptionCaught()"] 59f0289b_ecfd_de3c_3397_4cf08e2047d1["PcapWriteHandler"] 8bb104b3_dbc0_68f9_712f_44217e20e914 -->|defined in| 59f0289b_ecfd_de3c_3397_4cf08e2047d1 bbfbdddd_98c4_8181_5429_a45dee375189["completeTCPWrite()"] 8bb104b3_dbc0_68f9_712f_44217e20e914 -->|calls| bbfbdddd_98c4_8181_5429_a45dee375189 5c216ebb_cca2_4b62_0ccb_54f1456bc752["close()"] 8bb104b3_dbc0_68f9_712f_44217e20e914 -->|calls| 5c216ebb_cca2_4b62_0ccb_54f1456bc752 style 8bb104b3_dbc0_68f9_712f_44217e20e914 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/pcap/PcapWriteHandler.java lines 660–680
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
// Only write RST if this is an initialized TCP stream
if (channelType == ChannelType.TCP && state.get() == State.WRITING) {
ByteBuf tcpBuf = ctx.alloc().buffer();
try {
// Write RST with Normal Source and Destination Address
TCPPacket.writePacket(tcpBuf, null, sendSegmentNumber, receiveSegmentNumber, initiatorAddr.getPort(),
handlerAddr.getPort(), TCPPacket.TCPFlag.RST, TCPPacket.TCPFlag.ACK);
completeTCPWrite(initiatorAddr, handlerAddr, tcpBuf, ctx.alloc(), ctx);
} finally {
tcpBuf.release();
}
logger.debug("Sent Fake TCP RST to close connection");
}
close();
ctx.fireExceptionCaught(cause);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does exceptionCaught() do?
exceptionCaught() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/pcap/PcapWriteHandler.java.
Where is exceptionCaught() defined?
exceptionCaught() is defined in handler/src/main/java/io/netty/handler/pcap/PcapWriteHandler.java at line 660.
What does exceptionCaught() call?
exceptionCaught() calls 2 function(s): close, completeTCPWrite.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free