< 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: 1321_24790053727
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/>
 5412    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>
 38920    public SlicServerTransport(SlicTransportOptions options, IDuplexServerTransport duplexServerTransport)
 38921    {
 38922        _slicTransportOptions = options;
 38923        _duplexServerTransport = duplexServerTransport;
 38924    }
 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) =>
 37338        new SlicListener(
 37339            _duplexServerTransport.Listen(
 37340                transportAddress,
 37341                new DuplexConnectionOptions
 37342                {
 37343                    MinSegmentSize = options.MinSegmentSize,
 37344                    Pool = options.Pool
 37345                },
 37346                serverAuthenticationOptions),
 37347            options,
 37348            _slicTransportOptions);
 49}