Class MultiBindingTcpListener
Allows binding to a host name, which in turn may resolve to multiple IP addresses.
Inherited Members
Namespace: FubarDev.FtpServer
Assembly: FubarDev.FtpServer.dll
Syntax
public class MultiBindingTcpListener
Constructors
| Improve this Doc View SourceMultiBindingTcpListener(Nullable<String>, Int32, Nullable<ILogger>)
Initializes a new instance of the MultiBindingTcpListener class.
Declaration
public MultiBindingTcpListener(string? address, int port, ILogger? logger = default(ILogger? ))
Parameters
| Type | Name | Description |
|---|---|---|
| Nullable<String> | address | The address/host name to bind to. |
| Int32 | port | The listener port. |
| Nullable<ILogger> | logger | The logger. |
Properties
| Improve this Doc View SourcePort
Gets the port this listener is bound to.
Declaration
public int Port { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Methods
| Improve this Doc View SourceStartAccepting()
Start the asynchronous acception for all listeners.
Declaration
public void StartAccepting()
StartAsync()
Start all listeners.
Declaration
public Task StartAsync()
Returns
| Type | Description |
|---|---|
| Task | the task. |
Stop()
Stops all listeners.
Declaration
public void Stop()
WaitAnyTcpClientAsync(CancellationToken)
Wait for any client on all listeners.
Declaration
public Task<TcpClient> WaitAnyTcpClientAsync(CancellationToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | token | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<TcpClient> | The new TCP client. |