C# Class Avalon.Network.SocketServer

显示文件 Open project: mabinogidev/mabinogi-development Class Usage Examples

Public Properties

Property Type Description
ClientList List
PacketQueue Queue
m_SessionCount int

Public Methods

Method Description
Listen ( ) : bool
OnDataReceive ( IAsyncResult async ) : void

Invoked when a client sends data.

OnNewConnection ( IAsyncResult async ) : void

Invoked when listener recieved a new connection.

ProcessPacket ( byte buffer, SocketClient sockstate ) : void

ProcessPacket takes a given buffer and imports it to a Packet Factory for further processing.

ProcessQueue ( SocketClient sockstate ) : void
SocketServer ( IPAddress address, int port ) : System

Stores parameters in local variables m_serverIP and m_listenPort.

SocketServer ( Socket newConnection ) : System

Stores a reference to a placeholder for current objects socket.

Method Details

Listen() public method

public Listen ( ) : bool
return bool

OnDataReceive() public method

Invoked when a client sends data.
public OnDataReceive ( IAsyncResult async ) : void
async IAsyncResult
return void

OnNewConnection() public method

Invoked when listener recieved a new connection.
public OnNewConnection ( IAsyncResult async ) : void
async IAsyncResult
return void

ProcessPacket() public method

ProcessPacket takes a given buffer and imports it to a Packet Factory for further processing.
public ProcessPacket ( byte buffer, SocketClient sockstate ) : void
buffer byte
sockstate SocketClient
return void

ProcessQueue() public method

public ProcessQueue ( SocketClient sockstate ) : void
sockstate SocketClient
return void

SocketServer() public method

Stores parameters in local variables m_serverIP and m_listenPort.
public SocketServer ( IPAddress address, int port ) : System
address System.Net.IPAddress
port int
return System

SocketServer() public method

Stores a reference to a placeholder for current objects socket.
public SocketServer ( Socket newConnection ) : System
newConnection Socket
return System

Property Details

ClientList public_oe property

public List ClientList
return List

PacketQueue public_oe property

public Queue PacketQueue
return Queue

m_SessionCount public_oe property

public int m_SessionCount
return int