Package org.mockserver.netty.http3
Class Http3SegmentedSends
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelOutboundHandlerAdapter
org.mockserver.netty.http3.Http3SegmentedSends
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelOutboundHandler,io.netty.handler.codec.quic.SegmentedDatagramPacketAllocator
public class Http3SegmentedSends
extends io.netty.channel.ChannelOutboundHandlerAdapter
implements io.netty.handler.codec.quic.SegmentedDatagramPacketAllocator
The HTTP/3 listener's segmented (GSO,
UDP_SEGMENT) sends, given to the QUIC codec as its allocator and
placed in the listener's pipeline to watch the sends it makes. The kernel can refuse a segmented send on one path
while it supports the option (EIO through a device without checksum offload, such as a TUN device before Linux
6.11, or an IPsec route), and Netty then drops the packets with no error anyone sees. After the first failed
segmented send, whatever its cause (a closed listener aside), it reports no segments for the listener's life, so the
codec sends one datagram per packet, and QUIC resends what was lost as it does any loss. One instance serves one
listener, and its sends all complete on that listener's loop.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields inherited from interface io.netty.handler.codec.quic.SegmentedDatagramPacketAllocator
NONE -
Constructor Summary
ConstructorsConstructorDescriptionHttp3SegmentedSends(io.netty.handler.codec.quic.SegmentedDatagramPacketAllocator segmented, org.mockserver.logging.MockServerLogger mockServerLogger) -
Method Summary
Modifier and TypeMethodDescriptionintio.netty.channel.socket.DatagramPacketnewPacket(io.netty.buffer.ByteBuf buffer, int segmentSize, InetSocketAddress remoteAddress) voidwrite(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, readMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
exceptionCaught, handlerAdded, handlerRemoved
-
Constructor Details
-
Http3SegmentedSends
public Http3SegmentedSends(io.netty.handler.codec.quic.SegmentedDatagramPacketAllocator segmented, org.mockserver.logging.MockServerLogger mockServerLogger)
-
-
Method Details
-
maxNumSegments
public int maxNumSegments()- Specified by:
maxNumSegmentsin interfaceio.netty.handler.codec.quic.SegmentedDatagramPacketAllocator
-
newPacket
public io.netty.channel.socket.DatagramPacket newPacket(io.netty.buffer.ByteBuf buffer, int segmentSize, InetSocketAddress remoteAddress) - Specified by:
newPacketin interfaceio.netty.handler.codec.quic.SegmentedDatagramPacketAllocator
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) - Specified by:
writein interfaceio.netty.channel.ChannelOutboundHandler- Overrides:
writein classio.netty.channel.ChannelOutboundHandlerAdapter
-