< Summary

Information
Class: IceRpc.Transports.IMultiplexedServerTransport
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Transports/IMultiplexedServerTransport.cs
Tag: 592_20856082467
Line coverage
66%
Covered lines: 8
Uncovered lines: 4
Coverable lines: 12
Total lines: 52
Line coverage: 66.6%
Branch coverage
50%
Covered branches: 4
Total branches: 8
Branch coverage: 50%
Method coverage
100%
Covered methods: 2
Total methods: 2
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Default()50%11.08863.63%
.cctor()100%11100%

File(s)

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

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using IceRpc.Transports.Quic;
 4using System.Net.Quic;
 5using System.Net.Security;
 6using System.Runtime.Versioning;
 7
 8namespace IceRpc.Transports;
 9
 10/// <summary>A class to create a <see cref="IListener{T}" /> to accept incoming multiplexed connections.</summary>
 11public interface IMultiplexedServerTransport
 12{
 13    /// <summary>Gets the default multiplexed server transport.</summary>
 14    /// <value>The default multiplexed server transport is the <see cref="QuicServerTransport" />.</value>
 15    public static IMultiplexedServerTransport Default
 16    {
 17        get
 118        {
 119            if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() || OperatingSystem.IsWindows())
 120            {
 121                if (QuicListener.IsSupported)
 122                {
 123                    return _quicServerTransport;
 24                }
 025                throw new NotSupportedException(
 026                    "The default QUIC server transport is not available on this system. Please review the Platform Depen
 27            }
 028            throw new PlatformNotSupportedException(
 029                "The default QUIC server transport is not supported on this platform.");
 130        }
 31    }
 32
 33    [SupportedOSPlatform("linux")]
 34    [SupportedOSPlatform("macos")]
 35    [SupportedOSPlatform("windows")]
 136    private static readonly QuicServerTransport _quicServerTransport = new();
 37
 38    /// <summary>Gets the transport's name.</summary>
 39    /// <value>The transport name.</value>
 40    string Name { get; }
 41
 42    /// <summary>Starts listening on a server address.</summary>
 43    /// <param name="serverAddress">The server address of the listener.</param>
 44    /// <param name="options">The multiplexed connection options.</param>
 45    /// <param name="serverAuthenticationOptions">The SSL server authentication options.</param>
 46    /// <returns>The new listener.</returns>
 47    /// <remarks>The IceRPC core can call this method concurrently so it must be thread-safe.</remarks>
 48    IListener<IMultiplexedConnection> Listen(
 49        ServerAddress serverAddress,
 50        MultiplexedConnectionOptions options,
 51        SslServerAuthenticationOptions? serverAuthenticationOptions);
 52}

Methods/Properties

get_Default()
.cctor()