< Summary

Information
Class: IceRpc.Transports.MultiplexedConnectionOptions
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/MultiplexedConnectionOptions.cs
Tag: 592_20856082467
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 40
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 5
Total methods: 5
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_HandshakeTimeout()100%11100%
get_MaxBidirectionalStreams()100%11100%
get_MaxUnidirectionalStreams()100%11100%
get_MinSegmentSize()100%11100%
get_Pool()100%11100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/MultiplexedConnectionOptions.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using System.Buffers;
 4
 5namespace IceRpc.Transports;
 6
 7/// <summary>A property bag used to configure a <see cref="IMultiplexedConnection" />.</summary>
 8public record class MultiplexedConnectionOptions
 9{
 10    /// <summary>Gets or sets the minimum amount of time the multiplexed transport must allow for a connection
 11    /// establishment handshake to complete.</summary>
 12    /// <value>The handshake timeout. The default is 10 seconds.</value>
 13    /// <remarks>The caller is expected to cancel a connection establishment attempt after its own "connect timeout". As
 14    /// a result, a multiplexed transport implementation may choose to always provide an infinite handshake timeout,
 15    /// regardless of the value of this option.</remarks>
 98116    public TimeSpan HandshakeTimeout { get; set; } = TimeSpan.FromSeconds(10);
 17
 18    /// <summary>Gets or sets the maximum allowed number of simultaneous remote bidirectional streams that can be
 19    /// opened.</summary>
 20    /// <value>The maximum number of remote bidirectional streams. Defaults to <c>100</c>.</value>
 170921    public int MaxBidirectionalStreams { get; set; } = DefaultMaxBidirectionalStreams;
 22
 23    /// <summary>Gets or sets the maximum allowed number of simultaneous remote unidirectional streams that can be
 24    /// opened.</summary>
 25    /// <value>The maximum number of remote unidirectional streams. Defaults to <c>100</c>.</value>
 168426    public int MaxUnidirectionalStreams { get; set; } = DefaultMaxUnidirectionalStreams;
 27
 28    /// <summary>Gets or sets the minimum size of the segment requested from the <see cref="Pool" />.</summary>
 29    /// <value>The minimum size in bytes of the segment requested from the <see cref="Pool" />.  Defaults to <c>4</c>
 30    /// KB.</value>
 379331    public int MinSegmentSize { get; set; } = 4096;
 32
 33    /// <summary>Gets or sets the <see cref="MemoryPool{T}" /> object used for buffer management.</summary>
 34    /// <value>A pool of memory blocks used for buffer management. Defaults to <see cref="MemoryPool{T}.Shared"
 35    /// />.</value>
 379336    public MemoryPool<byte> Pool { get; set; } = MemoryPool<byte>.Shared;
 37
 38    internal const int DefaultMaxBidirectionalStreams = 100;
 39    internal const int DefaultMaxUnidirectionalStreams = 100;
 40}