udpZeroLengthByteBufCaptured() — netty Function Reference
Architecture documentation for the udpZeroLengthByteBufCaptured() function in PcapWriteHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 568c9eeb_3e86_a619_596b_e2249c5fae2f["udpZeroLengthByteBufCaptured()"] e9f4993c_4935_9405_4fab_0bbc9030a673["PcapWriteHandlerTest"] 568c9eeb_3e86_a619_596b_e2249c5fae2f -->|defined in| e9f4993c_4935_9405_4fab_0bbc9030a673 201e7e9e_c23c_b328_ecb1_117026fc1c03["InetSocketAddress()"] 568c9eeb_3e86_a619_596b_e2249c5fae2f -->|calls| 201e7e9e_c23c_b328_ecb1_117026fc1c03 5c425ce6_e952_d363_e0ef_0934a41b930a["EmbeddedDatagramChannel()"] 568c9eeb_3e86_a619_596b_e2249c5fae2f -->|calls| 5c425ce6_e952_d363_e0ef_0934a41b930a eb1ea467_0963_a158_64e4_4642e02fe449["verifyUdpCapture()"] 568c9eeb_3e86_a619_596b_e2249c5fae2f -->|calls| eb1ea467_0963_a158_64e4_4642e02fe449 style 568c9eeb_3e86_a619_596b_e2249c5fae2f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java lines 281–315
@Test
public void udpZeroLengthByteBufCaptured() {
final ByteBuf pcapBuffer = Unpooled.buffer();
final ByteBuf payload = Unpooled.buffer();
try {
InetSocketAddress serverAddr = new InetSocketAddress("1.1.1.1", 1234);
InetSocketAddress clientAddr = new InetSocketAddress("2.2.2.2", 3456);
// We fake a client
EmbeddedChannel embeddedChannel = new EmbeddedDatagramChannel(clientAddr, serverAddr);
embeddedChannel.pipeline().addLast(PcapWriteHandler.builder()
.captureZeroByte(true)
.build(new ByteBufOutputStream(pcapBuffer)));
assertTrue(embeddedChannel.writeOutbound(payload.retainedDuplicate()));
ByteBuf read = embeddedChannel.readOutbound();
assertEquals(payload, read);
read.release();
assertTrue(embeddedChannel.writeInbound(payload.retainedDuplicate()));
read = embeddedChannel.readInbound();
assertEquals(payload, read);
read.release();
verifyUdpCapture(true, pcapBuffer, payload, serverAddr, clientAddr);
verifyUdpCapture(false, pcapBuffer, payload, clientAddr, serverAddr);
assertFalse(embeddedChannel.finishAndReleaseAll());
} finally {
pcapBuffer.release();
payload.release();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does udpZeroLengthByteBufCaptured() do?
udpZeroLengthByteBufCaptured() is a function in the netty codebase, defined in handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java.
Where is udpZeroLengthByteBufCaptured() defined?
udpZeroLengthByteBufCaptured() is defined in handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java at line 281.
What does udpZeroLengthByteBufCaptured() call?
udpZeroLengthByteBufCaptured() calls 3 function(s): EmbeddedDatagramChannel, InetSocketAddress, verifyUdpCapture.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free