C# Class Org.Mentalis.Proxy.Client

Specifies the basic methods and properties of a Client object. This is an abstract class and must be inherited.
The Client class provides an abstract base class that represents a connection to a local client and a remote server. Descendant classes further specify the protocol that is used between those two connections.
Inheritance: IDisposable
Afficher le fichier Open project: paratechnical/Seringa Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
Client ( ) : System

Initializes a new instance of the Client object.

Both the ClientSocket property and the DestroyDelegate are initialized to null.

Client ( Socket ClientSocket, DestroyDelegate Destroyer ) : System

Initializes a new instance of the Client class.

Dispose ( ) : void

Disposes of the resources (other than memory) used by the Client.

Closes the connections with the local client and the remote host. Once Dispose has been called, this object should not be used anymore.

StartHandshake ( ) : void

Starts communication with the local client.

StartRelay ( ) : void

Starts relaying data between the remote host and the local client.

This method should only be called after all protocol specific communication has been finished.

ToString ( ) : string

Returns text information about this Client object.

Méthodes protégées

Méthode Description
OnClientReceive ( IAsyncResult ar ) : void

Called when we have received data from the local client.
Incoming data will immediately be forwarded to the remote host.

OnClientSent ( IAsyncResult ar ) : void

Called when we have sent data to the local client.
When all the data has been sent, we will start receiving again from the remote host.

OnRemoteReceive ( IAsyncResult ar ) : void

Called when we have received data from the remote host.
Incoming data will immediately be forwarded to the local client.

OnRemoteSent ( IAsyncResult ar ) : void

Called when we have sent data to the remote host.
When all the data has been sent, we will start receiving again from the local client.

Method Details

Client() public méthode

Initializes a new instance of the Client object.
Both the ClientSocket property and the DestroyDelegate are initialized to null.
public Client ( ) : System
Résultat System

Client() public méthode

Initializes a new instance of the Client class.
public Client ( Socket ClientSocket, DestroyDelegate Destroyer ) : System
ClientSocket Socket The Socket connection between this proxy server and the local client.
Destroyer DestroyDelegate The callback method to be called when this Client object disconnects from the local client and the remote server.
Résultat System

Dispose() public méthode

Disposes of the resources (other than memory) used by the Client.
Closes the connections with the local client and the remote host. Once Dispose has been called, this object should not be used anymore.
public Dispose ( ) : void
Résultat void

OnClientReceive() protected méthode

Called when we have received data from the local client.
Incoming data will immediately be forwarded to the remote host.
protected OnClientReceive ( IAsyncResult ar ) : void
ar IAsyncResult The result of the asynchronous operation.
Résultat void

OnClientSent() protected méthode

Called when we have sent data to the local client.
When all the data has been sent, we will start receiving again from the remote host.
protected OnClientSent ( IAsyncResult ar ) : void
ar IAsyncResult The result of the asynchronous operation.
Résultat void

OnRemoteReceive() protected méthode

Called when we have received data from the remote host.
Incoming data will immediately be forwarded to the local client.
protected OnRemoteReceive ( IAsyncResult ar ) : void
ar IAsyncResult The result of the asynchronous operation.
Résultat void

OnRemoteSent() protected méthode

Called when we have sent data to the remote host.
When all the data has been sent, we will start receiving again from the local client.
protected OnRemoteSent ( IAsyncResult ar ) : void
ar IAsyncResult The result of the asynchronous operation.
Résultat void

StartHandshake() public abstract méthode

Starts communication with the local client.
public abstract StartHandshake ( ) : void
Résultat void

StartRelay() public méthode

Starts relaying data between the remote host and the local client.
This method should only be called after all protocol specific communication has been finished.
public StartRelay ( ) : void
Résultat void

ToString() public méthode

Returns text information about this Client object.
public ToString ( ) : string
Résultat string