C# Class EpServerEngine.cs.IocpTcpClient

A IOCP TCP Client class.
Inheritance: ThreadEx, INetworkClient, IDisposable
Afficher le fichier Open project: juhgiyo/EpServerEngine.cs Class Usage Examples

Private Properties

Свойство Type Description
Dispose void
onConnected void
onReceived void
onSent void
startReceive void

Méthodes publiques

Méthode Description
Connect ( EpServerEngine.cs.ClientOps ops ) : void

Connect to the server with given options

Disconnect ( ) : void

Disconnect from the server

Dispose ( ) : void
IocpTcpClient ( ) : System

Default constructor

IocpTcpClient ( IocpTcpClient b ) : System

Default copy constructor

Send ( EpServerEngine.cs.Packet packet ) : void

Send given packet to the server

Send ( byte data ) : void

Send given data to the server

Send ( byte data, int offset, int dataSize ) : void

Send given data to the server

Méthodes protégées

Méthode Description
execute ( ) : void

Make the connection to the server and start receiving

Private Methods

Méthode Description
Dispose ( bool isDisposing ) : void
onConnected ( IAsyncResult result ) : void

Connection callback function

onReceived ( IAsyncResult result ) : void

Receive callback function

onSent ( IAsyncResult result ) : void

Send callback function

startReceive ( ) : void

Start to receive packet from the server

Method Details

Connect() public méthode

Connect to the server with given options
public Connect ( EpServerEngine.cs.ClientOps ops ) : void
ops EpServerEngine.cs.ClientOps options for client
Résultat void

Disconnect() public méthode

Disconnect from the server
public Disconnect ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

IocpTcpClient() public méthode

Default constructor
public IocpTcpClient ( ) : System
Résultat System

IocpTcpClient() public méthode

Default copy constructor
public IocpTcpClient ( IocpTcpClient b ) : System
b IocpTcpClient the object to copy from
Résultat System

Send() public méthode

Send given packet to the server
public Send ( EpServerEngine.cs.Packet packet ) : void
packet EpServerEngine.cs.Packet packet to send
Résultat void

Send() public méthode

Send given data to the server
public Send ( byte data ) : void
data byte data in byte array
Résultat void

Send() public méthode

Send given data to the server
public Send ( byte data, int offset, int dataSize ) : void
data byte data in byte array
offset int offset in bytes
dataSize int data size in bytes
Résultat void

execute() protected méthode

Make the connection to the server and start receiving
protected execute ( ) : void
Résultat void