< Summary

Information
Class: IceRpc.Transports.MultiplexedConnectionOptions
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/MultiplexedConnectionOptions.cs
Tag: 1856_27024993493
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 44
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 5
Fully covered methods: 5
Total methods: 5
Method coverage: 100%
Full 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>
 105516    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>
 183621    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>
 181126    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>
 407731    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>
 36    /// <remarks>Some multiplexed transports require the pool to return array-backed memory blocks. Slic over TCP
 37    /// does, because Slic's write buffers are allocated from this pool and passed down to the TCP transport,
 38    /// whose multi-segment write path uses <see cref="System.Net.Sockets.Socket.SendAsync(IList{ArraySegment{byte}},
 39    /// System.Net.Sockets.SocketFlags)" />. The QUIC transport has no such requirement.</remarks>
 407740    public MemoryPool<byte> Pool { get; set; } = MemoryPool<byte>.Shared;
 41
 42    internal const int DefaultMaxBidirectionalStreams = 100;
 43    internal const int DefaultMaxUnidirectionalStreams = 100;
 44}