Interface IPasvListenerFactory
Creates correctly configured IPasvListener.
Namespace: FubarDev.FtpServer
Assembly: FubarDev.FtpServer.Abstractions.dll
Syntax
public interface IPasvListenerFactory
Methods
| Improve this Doc View SourceCreateTcpListenerAsync(IFtpConnection, Nullable<AddressFamily>, Int32, CancellationToken)
Create a new TcpListener for the given connection.
Declaration
Task<IPasvListener> CreateTcpListenerAsync(IFtpConnection connection, AddressFamily? addressFamily = default(AddressFamily? ), int port = 0, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IFtpConnection | connection | connection on which to create the tcp listener. |
Nullable<AddressFamily> | addressFamily | The address family for the address to be selected. |
Int32 | port | listen on the given port, or 0 for any port. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IPasvListener> | A TcpListener. |
Exceptions
Type | Condition |
---|---|
SocketException | Network error, such as no free port. |
ArgumentOutOfRangeException | The chosen port was not within the configured range of ports. |