-
Notifications
You must be signed in to change notification settings - Fork 12
/
IMultiplexedServerTransport.cs
30 lines (25 loc) · 1.36 KB
/
IMultiplexedServerTransport.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) ZeroC, Inc.
using IceRpc.Transports.Slic;
using IceRpc.Transports.Tcp;
using System.Net.Security;
namespace IceRpc.Transports;
/// <summary>A class to create a <see cref="IListener{T}" /> to accept incoming multiplexed connections.</summary>
public interface IMultiplexedServerTransport
{
/// <summary>Gets the default multiplexed server transport.</summary>
/// <value>The default multiplexed server transport is the <see cref="SlicServerTransport" />.</value>
public static IMultiplexedServerTransport Default { get; } = new SlicServerTransport(new TcpServerTransport());
/// <summary>Gets the transport's name.</summary>
/// <value>The transport name.</value>
string Name { get; }
/// <summary>Starts listening on a server address.</summary>
/// <param name="serverAddress">The server address of the listener.</param>
/// <param name="options">The multiplexed connection options.</param>
/// <param name="serverAuthenticationOptions">The SSL server authentication options.</param>
/// <returns>The new listener.</returns>
/// <remarks>The IceRPC core can call this method concurrently so it must be thread-safe.</remarks>
IListener<IMultiplexedConnection> Listen(
ServerAddress serverAddress,
MultiplexedConnectionOptions options,
SslServerAuthenticationOptions? serverAuthenticationOptions);
}