| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | using IceRpc.Transports.Tcp; |
| | | 4 | | using System.Net.Security; |
| | | 5 | | |
| | | 6 | | namespace IceRpc.Transports; |
| | | 7 | | |
| | | 8 | | /// <summary>A class to create a <see cref="IListener{T}" /> to accept incoming duplex connections.</summary> |
| | | 9 | | public interface IDuplexServerTransport |
| | | 10 | | { |
| | | 11 | | /// <summary>Gets the default duplex server transport.</summary> |
| | | 12 | | /// <value>The default duplex server transport is the <see cref="TcpServerTransport" />.</value> |
| | 44 | 13 | | public static IDuplexServerTransport Default { get; } = new TcpServerTransport(); |
| | | 14 | | |
| | | 15 | | /// <summary>Gets the default transport name.</summary> |
| | | 16 | | /// <value>The transport accepts transport addresses that use this name as the |
| | | 17 | | /// <see cref="TransportAddress.TransportName"/>. Some transports may accept additional names beyond this default. |
| | | 18 | | /// </value> |
| | | 19 | | string DefaultName { get; } |
| | | 20 | | |
| | | 21 | | /// <summary>Starts listening on a transport address.</summary> |
| | | 22 | | /// <param name="transportAddress">The transport address to listen on.</param> |
| | | 23 | | /// <param name="options">The duplex connection options.</param> |
| | | 24 | | /// <param name="serverAuthenticationOptions">The SSL server authentication options.</param> |
| | | 25 | | /// <returns>The new listener.</returns> |
| | | 26 | | /// <remarks>The IceRPC core can call this method concurrently so it must be thread-safe.</remarks> |
| | | 27 | | IListener<IDuplexConnection> Listen( |
| | | 28 | | TransportAddress transportAddress, |
| | | 29 | | DuplexConnectionOptions options, |
| | | 30 | | SslServerAuthenticationOptions? serverAuthenticationOptions); |
| | | 31 | | } |