< Summary

Information
Class: IceRpc.Transports.Slic.SlicServerTransport
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/Slic/SlicServerTransport.cs
Tag: 1856_27024993493
Line coverage
100%
Covered lines: 20
Uncovered lines: 0
Coverable lines: 20
Total lines: 49
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 4
Fully covered methods: 4
Total methods: 4
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_DefaultName()100%11100%
.ctor(...)100%11100%
.ctor(...)100%11100%
Listen(...)100%11100%

File(s)

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

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using IceRpc.Transports.Slic.Internal;
 4using System.Net.Security;
 5
 6namespace IceRpc.Transports.Slic;
 7
 8/// <summary>Implements <see cref="IMultiplexedServerTransport" /> using Slic over a duplex server transport.</summary>
 9public class SlicServerTransport : IMultiplexedServerTransport
 10{
 11    /// <inheritdoc/>
 5812    public string DefaultName => _duplexServerTransport.DefaultName;
 13
 14    private readonly IDuplexServerTransport _duplexServerTransport;
 15    private readonly SlicTransportOptions _slicTransportOptions;
 16
 17    /// <summary>Constructs a Slic server transport.</summary>
 18    /// <param name="options">The options to configure the transport.</param>
 19    /// <param name="duplexServerTransport">The duplex server transport.</param>
 41220    public SlicServerTransport(SlicTransportOptions options, IDuplexServerTransport duplexServerTransport)
 41221    {
 41222        _slicTransportOptions = options;
 41223        _duplexServerTransport = duplexServerTransport;
 41224    }
 25
 26    /// <summary>Constructs a Slic server transport.</summary>
 27    /// <param name="duplexServerTransport">The duplex server transport.</param>
 28    public SlicServerTransport(IDuplexServerTransport duplexServerTransport)
 5129        : this(new SlicTransportOptions(), duplexServerTransport)
 5130    {
 5131    }
 32
 33    /// <inheritdoc/>
 34    public IListener<IMultiplexedConnection> Listen(
 35        TransportAddress transportAddress,
 36        MultiplexedConnectionOptions options,
 37        SslServerAuthenticationOptions? serverAuthenticationOptions) =>
 39738        new SlicListener(
 39739            _duplexServerTransport.Listen(
 39740                transportAddress,
 39741                new DuplexConnectionOptions
 39742                {
 39743                    MinSegmentSize = options.MinSegmentSize,
 39744                    Pool = options.Pool
 39745                },
 39746                serverAuthenticationOptions),
 39747            options,
 39748            _slicTransportOptions);
 49}