C# Class FubarDev.FtpServer.FtpConnection

This class represents a FTP connection
Inheritance: IDisposable
显示文件 Open project: FubarDevelopment/FtpServer Class Usage Examples

Private Properties

Property Type Description
AddExtensions void
CreateEncryptedStream Task
CreateResponseSocket Task
FindCommandHandler Tuple
OnClosed void
ProcessMessage Task
ProcessMessages Task
Write void

Public Methods

Method Description
Close ( ) : void

Closes the connection

Dispose ( ) : void
FtpConnection ( [ server, [ socket, [ encoding ) : System

Initializes a new instance of the FtpConnection class.

Start ( ) : void

Starts processing of messages for this connection

WriteAsync ( [ response, CancellationToken cancellationToken ) : Task

Writes a FTP response to a client

Private Methods

Method Description
AddExtensions ( IEnumerable extensions ) : void
CreateEncryptedStream ( [ unencryptedStream ) : Task
CreateResponseSocket ( ) : Task
FindCommandHandler ( FtpCommand command ) : Tuple
OnClosed ( ) : void
ProcessMessage ( FtpCommand command ) : Task
ProcessMessages ( ) : Task
Write ( [ response ) : void

Writes a FTP response to a client

Method Details

Close() public method

Closes the connection
public Close ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

FtpConnection() public method

Initializes a new instance of the FtpConnection class.
public FtpConnection ( [ server, [ socket, [ encoding ) : System
server [ The server this connection belongs to
socket [ The socket to use to communicate with the client
encoding [ The encoding to use for the LIST/NLST commands
return System

Start() public method

Starts processing of messages for this connection
public Start ( ) : void
return void

WriteAsync() public method

Writes a FTP response to a client
public WriteAsync ( [ response, CancellationToken cancellationToken ) : Task
response [ The response to write to the client
cancellationToken System.Threading.CancellationToken The cancellation token
return Task