Class QuicCodecBuilder<B extends QuicCodecBuilder<B>>
java.lang.Object
io.netty.handler.codec.quic.QuicCodecBuilder<B>
- Type Parameters:
B- the type of theQuicCodecBuilder.
- Direct Known Subclasses:
QuicClientCodecBuilder, QuicServerCodecBuilder
Abstract base class for
QUIC codec builders.-
Method Summary
Modifier and TypeMethodDescriptionfinal BackDelayExponent(long value) final BactiveConnectionIdLimit(long limit) Allows to configure theactive connect id limitthat should be used.final BactiveMigration(boolean enable) final ChannelHandlerbuild()Builds the QUIC codec that should be added to theChannelPipelineof the underlyingChannelwhich is used as transport for QUIC.abstract Bclone()Clone the builderfinal BcongestionControlAlgorithm(QuicCongestionControlAlgorithm congestionControlAlgorithm) Sets the congestion control algorithm to use.final Bdatagram(int recvQueueLen, int sendQueueLen) If configured this will enable Datagram support.final BdiscoverPmtu(boolean enable) See discover_pmtu.final BflushStrategy(FlushStrategy flushStrategy) Sets theFlushStrategythat will be used to detect when an automatic flush should happen.final Bgrease(boolean enable) Set if greasing should be enabled or not.final Bhystart(boolean enable) See enable_hystart.final BinitialCongestionWindowPackets(int numPackets) Sets initial congestion window size in terms of packet count.final BinitialMaxData(long value) See set_initial_max_data.final BinitialMaxStreamDataBidirectionalLocal(long value) final BinitialMaxStreamDataBidirectionalRemote(long value) final BinitialMaxStreamDataUnidirectional(long value) final BinitialMaxStreamsBidirectional(long value) final BinitialMaxStreamsUnidirectional(long value) final BlocalConnectionIdLength(int value) Sets the local connection id length that is used.final BmaxAckDelay(long amount, TimeUnit unit) See set_max_ack_delay.final BmaxIdleTimeout(long amount, TimeUnit unit) See set_max_idle_timeout.final BmaxRecvUdpPayloadSize(long size) final BmaxSendUdpPayloadSize(long size) protected final Bself()Returns itself.final BsslContext(QuicSslContext sslContext) final BsslEngineProvider(Function<QuicChannel, ? extends QuicSslEngine> sslEngineProvider) final BsslTaskExecutor(Executor sslTaskExecutor) Allow to configure aExecutorthat will be used to run expensive SSL operations.final BstatelessResetToken(byte[] token) Allows to configure theactive connect id limitthat should be used.protected voidvalidate()Validate the configuration before building the codec.final Bversion(int version) Allows to configure theQUIC versionthat should be used.
-
Method Details
-
self
-
flushStrategy
Sets theFlushStrategythat will be used to detect when an automatic flush should happen.- Parameters:
flushStrategy- the strategy to use.- Returns:
- the instance itself.
-
congestionControlAlgorithm
public final B congestionControlAlgorithm(QuicCongestionControlAlgorithm congestionControlAlgorithm) Sets the congestion control algorithm to use. The default isQuicCongestionControlAlgorithm.CUBIC.- Parameters:
congestionControlAlgorithm- theQuicCongestionControlAlgorithmto use.- Returns:
- the instance itself.
-
initialCongestionWindowPackets
Sets initial congestion window size in terms of packet count. The default value is 10.- Parameters:
numPackets- number of packets for the initial congestion window- Returns:
-
grease
-
maxIdleTimeout
See set_max_idle_timeout. The default value is infinite, that is, no timeout is used.- Parameters:
amount- the maximum idle timeout.unit- theTimeUnit.- Returns:
- the instance itself.
-
maxSendUdpPayloadSize
See set_max_send_udp_payload_size. The default and minimum value is 1200.- Parameters:
size- the maximum payload size that is advertised to the remote peer.- Returns:
- the instance itself.
-
maxRecvUdpPayloadSize
See set_max_recv_udp_payload_size. The default value is 65527.- Parameters:
size- the maximum payload size that is advertised to the remote peer.- Returns:
- the instance itself.
-
initialMaxData
See set_initial_max_data. The default value is 0.- Parameters:
value- the initial maximum data limit.- Returns:
- the instance itself.
-
initialMaxStreamDataBidirectionalLocal
See set_initial_max_stream_data_bidi_local. The default value is 0.- Parameters:
value- the initial maximum data limit for local bidirectional streams.- Returns:
- the instance itself.
-
initialMaxStreamDataBidirectionalRemote
See set_initial_max_stream_data_bidi_remote. The default value is 0.- Parameters:
value- the initial maximum data limit for remote bidirectional streams.- Returns:
- the instance itself.
-
initialMaxStreamDataUnidirectional
See set_initial_max_stream_data_uni. The default value is 0.- Parameters:
value- the initial maximum data limit for unidirectional streams.- Returns:
- the instance itself.
-
initialMaxStreamsBidirectional
See set_initial_max_streams_bidi. The default value is 0.- Parameters:
value- the initial maximum stream limit for bidirectional streams.- Returns:
- the instance itself.
-
initialMaxStreamsUnidirectional
See set_initial_max_streams_uni. The default value is 0.- Parameters:
value- the initial maximum stream limit for unidirectional streams.- Returns:
- the instance itself.
-
ackDelayExponent
See set_ack_delay_exponent. The default value is 3.- Parameters:
value- the delay exponent used for ACKs.- Returns:
- the instance itself.
-
maxAckDelay
See set_max_ack_delay. The default value is 25 milliseconds.- Parameters:
amount- the max ack delay.unit- theTimeUnit.- Returns:
- the instance itself.
-
activeMigration
See set_disable_active_migration. The default value istrue.- Parameters:
enable-trueif migration should be enabled,falseotherwise.- Returns:
- the instance itself.
-
hystart
See enable_hystart. The default value istrue.- Parameters:
enable-trueif Hystart should be enabled.- Returns:
- the instance itself.
-
discoverPmtu
See discover_pmtu. Configures whether to do path MTU discovery. The default value isfalse.- Parameters:
enable-trueif path MTU discovery should be enabled.- Returns:
- the instance itself.
-
localConnectionIdLength
Sets the local connection id length that is used. The default is 20, which is also the maximum that is supported.- Parameters:
value- the length of local generated connections ids.- Returns:
- the instance itself.
-
version
Allows to configure theQUIC versionthat should be used. The default value is the latest supported version by the underlying library.- Parameters:
version- theQUIC versionto use.- Returns:
- the instance itself.
-
datagram
If configured this will enable Datagram support.- Parameters:
recvQueueLen- the RECV queue length.sendQueueLen- the SEND queue length.- Returns:
- the instance itself.
-
sslContext
TheQuicSslContextthat will be used to createQuicSslEngines forQuicChannels. If you need a more flexible way to provideQuicSslEngines usesslEngineProvider(Function).- Parameters:
sslContext- the context.- Returns:
- the instance itself.
-
sslEngineProvider
- Parameters:
sslEngineProvider- the provider.- Returns:
- the instance itself.
-
sslTaskExecutor
-
activeConnectionIdLimit
Allows to configure theactive connect id limitthat should be used.- Parameters:
limit- the limit to use.- Returns:
- the instance itself.
-
statelessResetToken
Allows to configure theactive connect id limitthat should be used.- Parameters:
token- the token to use.- Returns:
- the instance itself.
-
validate
protected void validate()Validate the configuration before building the codec. -
build
Builds the QUIC codec that should be added to theChannelPipelineof the underlyingChannelwhich is used as transport for QUIC.- Returns:
- the
ChannelHandlerwhich acts as QUIC codec.
-
clone
-