C# 클래스 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.
상속: IDisposable
파일 보기 프로젝트 열기: paratechnical/Seringa 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
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.

메소드 상세

Client() 공개 메소드

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

Client() 공개 메소드

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.
리턴 System

Dispose() 공개 메소드

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
리턴 void

OnClientReceive() 보호된 메소드

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.
리턴 void

OnClientSent() 보호된 메소드

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.
리턴 void

OnRemoteReceive() 보호된 메소드

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.
리턴 void

OnRemoteSent() 보호된 메소드

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.
리턴 void

StartHandshake() 공개 추상적인 메소드

Starts communication with the local client.
public abstract StartHandshake ( ) : void
리턴 void

StartRelay() 공개 메소드

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
리턴 void

ToString() 공개 메소드

Returns text information about this Client object.
public ToString ( ) : string
리턴 string