Class PasvListener
The default implementation of the IPasvListener interface.
Inherited Members
Namespace: FubarDev.FtpServer
Assembly: FubarDev.FtpServer.dll
Syntax
public class PasvListener : IPasvListener, IDisposable
Constructors
| Improve this Doc View SourcePasvListener(IPAddress, Int32, IPAddress)
Initializes a new instance of the PasvListener class.
Declaration
public PasvListener(IPAddress listenAddress, int port, IPAddress externalAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| IPAddress | listenAddress | On which address to listen. |
| Int32 | port | Port to listen on, or 0 for any. |
| IPAddress | externalAddress | which external address should be advertised to clients. Use null to use the listener's address. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | listenAddress is null. |
| ArgumentOutOfRangeException | port is out of range. |
Properties
| Improve this Doc View SourcePasvEndPoint
Gets the Endpoint under which the listener is reachable by clients.
Declaration
public IPEndPoint PasvEndPoint { get; }
Property Value
| Type | Description |
|---|---|
| IPEndPoint |
Methods
| Improve this Doc View SourceAcceptPasvClientAsync()
Accept a client from a PASV command.
Declaration
public Task<TcpClient> AcceptPasvClientAsync()
Returns
| Type | Description |
|---|---|
| Task<TcpClient> | A TcpClient with which to communicate with the client. |
Exceptions
| Type | Condition |
|---|---|
| SocketException | Network error, see SocketError. |
| ObjectDisposedException | Listener was disposed of. |
Dispose()
Declaration
public void Dispose()