Class ConnectionOptions
- Namespace
- IceRpc
- Assembly
- IceRpc.dll
Represents a property bag used to configure client and server connections.
public record ConnectionOptions : IEquatable<ConnectionOptions>
- Inheritance
-
ConnectionOptions
- Implements
- Derived
- Inherited Members
Properties
Dispatcher
Gets or sets the dispatcher that dispatches requests received by this connection.
public IDispatcher? Dispatcher { get; set; }
Property Value
- IDispatcher
The dispatcher that dispatches requests received by this connection, or null if this connection does not accept requests.
EnableIceIdleCheck
Gets or sets a value indicating whether or not to enable the Ice idle check. This option is specific to the ice protocol. When the Ice idle check is enabled, a read operation on the underlying transport connection fails when this read waits for over IceIdleTimeout to receive any byte. When the Ice idle check is disabled, the IceIdleTimeout has no effect on reads: a read on the underlying transport connection can wait forever to receive a byte.
public bool EnableIceIdleCheck { get; set; }
Property Value
- bool
true if Ice idle check is enabled; otherwise, false. Defaults to false for compatibility with the default ACM configuration of Ice 3.7. The recommended setting is true when the peer is an Ice application with the HeartbeatAlways ACM configuration or when the peer is an IceRPC application.
Remarks
When setting this value to true, make sure the peer's idle timeout is equal to or less than IceIdleTimeout.
IceIdleTimeout
Gets or sets the Ice idle timeout. This option is specific to the ice protocol. Once the connection is established, the runtime sends a heartbeat to the peer when there is no write on the connection for half this Ice idle timeout.
public TimeSpan IceIdleTimeout { get; set; }
Property Value
- TimeSpan
The Ice idle timeout. Defaults to
60
seconds to match the default ACM configuration in Ice 3.7.
- See Also
InactivityTimeout
Gets or sets the inactivity timeout. This timeout is used to gracefully shutdown the connection if it's inactive for longer than this timeout. A connection is considered inactive when there's no invocation or dispatch in progress.
public TimeSpan InactivityTimeout { get; set; }
Property Value
- TimeSpan
The inactivity timeout. Defaults to
5
minutes.
MaxDispatches
Gets or sets the maximum number of requests that a connection can dispatch concurrently. Once this limit is reached, the connection stops reading new requests off its underlying transport connection.
public int MaxDispatches { get; set; }
Property Value
- int
The maximum number of requests that a connection can dispatch concurrently.
0
means no maximum. Defaults to100
requests.
Remarks
With the icerpc protocol, you may also need to set MaxIceRpcBidirectionalStreams and MaxIceRpcUnidirectionalStreams. A typical two-way dispatch holds onto one bidirectional stream while a typical one-way dispatch quickly releases its unidirectional stream and then executes without consuming any stream.
MaxIceFrameSize
Gets or sets the maximum size of a frame received over the ice protocol.
public int MaxIceFrameSize { get; set; }
Property Value
- int
The maximum size of an incoming frame, in bytes. This value must be at least
256
. Defaults to1
MB.
MaxIceRpcBidirectionalStreams
Gets or sets the maximum allowed number of simultaneous remote bidirectional streams that can be accepted on an icerpc connection. When this limit is reached, the peer is not allowed to open any new bidirectional stream. Since an bidirectional stream is opened for each two-way invocation, the sending of the two-way invocation will be delayed until another two-way invocation's stream completes.
public int MaxIceRpcBidirectionalStreams { get; set; }
Property Value
- int
The maximum number of bidirectional streams. It can't be less than
1
. Defaults to100
.
MaxIceRpcHeaderSize
Gets or sets the maximum size of icerpc protocol header.
public int MaxIceRpcHeaderSize { get; set; }
Property Value
- int
The maximum size in bytes of the header of an incoming request, response or control frame. Defaults to
16,383
, and the range of this value is63
to1,048,575
.
MaxIceRpcUnidirectionalStreams
Gets or sets the maximum allowed number of simultaneous remote unidirectional streams that can be accepted on an icerpc connection. When this limit is reached, the peer is not allowed to open any new unidirectional stream. Since an unidirectional stream is opened for each one-way invocation, the sending of the one-way invocation will be delayed until another one-way invocation's stream completes.
public int MaxIceRpcUnidirectionalStreams { get; set; }
Property Value
- int
The maximum number of unidirectional streams. It can't be less than
1
. Defaults to100
.
MinSegmentSize
Gets or sets the minimum size of the segment requested from the Pool.
public int MinSegmentSize { get; set; }
Property Value
Pool
Gets or sets the MemoryPool<T> object used by the connection for allocating memory blocks.
public MemoryPool<byte> Pool { get; set; }
Property Value
- MemoryPool<byte>
A pool of memory blocks used for buffer management. Defaults to Shared.