C# Class Miracle.FileZilla.Api.SocketCommunication

Base class used for communication with a socket
Inheritance: IDisposable
显示文件 Open project: PolarbearDK/Miracle.FileZilla.Api

Public Methods

Method Description
Dispose ( ) : void

Implementation of IDisposable interface

Protected Methods

Method Description
Connect ( ) : void

Connect socket to endpoint

Disconnect ( ) : void

Disconnect socket

Dispose ( bool disposing ) : void

Dispose object

LogData ( string text, byte bytes ) : void

Write data to log as hex dump. (Set Log parameter to activate)

Receive ( ) : byte[]

Receive data from socket.

Send ( byte data ) : void

Send data to socket

SocketCommunication ( IPAddress address, int port ) : System

Construct admin socket on specific IP and port.

Method Details

Connect() protected method

Connect socket to endpoint
protected Connect ( ) : void
return void

Disconnect() protected method

Disconnect socket
protected Disconnect ( ) : void
return void

Dispose() public method

Implementation of IDisposable interface
public Dispose ( ) : void
return void

Dispose() protected method

Dispose object
protected Dispose ( bool disposing ) : void
disposing bool Dispose unmanaged resources?
return void

LogData() protected method

Write data to log as hex dump. (Set Log parameter to activate)
protected LogData ( string text, byte bytes ) : void
text string Label to write before hex dump
bytes byte Data bytes to hex dump
return void

Receive() protected method

Receive data from socket.
/// if BufferSize is too small ///
protected Receive ( ) : byte[]
return byte[]

Send() protected method

Send data to socket
protected Send ( byte data ) : void
data byte Binary data to send
return void

SocketCommunication() protected method

Construct admin socket on specific IP and port.
protected SocketCommunication ( IPAddress address, int port ) : System
address System.Net.IPAddress IP address of filezilla server.
port int Admin port as specified when FileZilla server were installed
return System