MsQuicConnectionOptions Class

The options of a QUIC connection, common to the client and the server.

public abstract class MsQuicConnectionOptions

Properties

NameDescription
CongestionControlAlgorithmGets or sets the congestion control algorithm.
DefaultCloseErrorCodeGets or sets the error code sent to the peer when the connection is disposed without being closed.
DefaultStreamErrorCodeGets or sets the error code sent to the peer when a stream is disposed without being completed, or when an operation is canceled.
EnableDatagramsGets or sets a value indicating whether the connection accepts QUIC datagrams (RFC 9221). The peer must enable them too before either side can send one.
HandshakeTimeoutGets or sets the time the handshake can take. TimeSpan.Zero keeps the default of MsQuic (10 seconds).
IdleTimeoutGets or sets the time without activity after which the connection is closed. TimeSpan.Zero keeps the default of MsQuic (30 seconds).
KeepAliveIntervalGets or sets the interval of the keep-alive packets. TimeSpan.Zero disables them.
MaxInboundBidirectionalStreamsGets or sets the number of bidirectional streams the peer can have open at the same time. The default is 100.
MaxInboundUnidirectionalStreamsGets or sets the number of unidirectional streams the peer can have open at the same time. The default is 100.
ReceivedDatagramQueueCapacityGets or sets the number of received datagrams kept until MsQuicConnection.ReceiveDatagramAsync reads them. When the queue is full, the oldest datagram is dropped. The default is 1024.

CongestionControlAlgorithm

MsQuicConnectionOptions.cs

Gets or sets the congestion control algorithm.

public MsQuicCongestionControlAlgorithm CongestionControlAlgorithm { get; set; }

DefaultCloseErrorCode

MsQuicConnectionOptions.cs

Gets or sets the error code sent to the peer when the connection is disposed without being closed.

public long DefaultCloseErrorCode { get; set; }

Property value

long

DefaultStreamErrorCode

MsQuicConnectionOptions.cs

Gets or sets the error code sent to the peer when a stream is disposed without being completed, or when an operation is canceled.

public long DefaultStreamErrorCode { get; set; }

Property value

long

Gets or sets a value indicating whether the connection accepts QUIC datagrams (RFC 9221). The peer must enable them too before either side can send one.

public bool EnableDatagrams { get; set; }

Property value

bool

Gets or sets the time the handshake can take. TimeSpan.Zero keeps the default of MsQuic (10 seconds).

public TimeSpan HandshakeTimeout { get; set; }

Property value

TimeSpan

Gets or sets the time without activity after which the connection is closed. TimeSpan.Zero keeps the default of MsQuic (30 seconds).

public TimeSpan IdleTimeout { get; set; }

Property value

TimeSpan

Gets or sets the interval of the keep-alive packets. TimeSpan.Zero disables them.

public TimeSpan KeepAliveInterval { get; set; }

Property value

TimeSpan

MaxInboundBidirectionalStreams

MsQuicConnectionOptions.cs

Gets or sets the number of bidirectional streams the peer can have open at the same time. The default is 100.

public int MaxInboundBidirectionalStreams { get; set; }

Property value

int

MaxInboundUnidirectionalStreams

MsQuicConnectionOptions.cs

Gets or sets the number of unidirectional streams the peer can have open at the same time. The default is 100.

public int MaxInboundUnidirectionalStreams { get; set; }

Property value

int

ReceivedDatagramQueueCapacity

MsQuicConnectionOptions.cs

Gets or sets the number of received datagrams kept until MsQuicConnection.ReceiveDatagramAsync reads them. When the queue is full, the oldest datagram is dropped. The default is 1024.

public int ReceivedDatagramQueueCapacity { get; set; }

Property value

int