C# Class SagaLib.ClientManager

Mostrar archivo Open project: Willyham/SagaRO2 Class Usage Examples

Public Properties

Property Type Description
commandTable Packet>.Dictionary
enteredcriarea bool
listener System.Net.Sockets.TcpListener
packetCoordinator Thread
waitingWaitressesCount uint
waitressCountLock Object
waitressHasFinished System.Threading.ManualResetEvent
waitressQueue System.Threading.AutoResetEvent

Public Methods

Method Description
AddWaitingWaitress ( ) : void
ClientManager ( ) : System
EnterCriticalArea ( ) : void
GetClient ( uint SessionID ) : SagaLib.Client
LeaveCriticalArea ( ) : void
NetworkLoop ( int maxNewConnections ) : void
OnClientDisconnect ( SagaLib.Client client ) : void
RemoveWaitingWaitress ( ) : void
Start ( ) : void
StartNetwork ( int port ) : bool

Starts the network listener socket.

Stop ( ) : void
checkCriticalArea ( ) : void
packetCoordinationLoop ( ) : void

Method Details

AddWaitingWaitress() public method

public AddWaitingWaitress ( ) : void
return void

ClientManager() public method

public ClientManager ( ) : System
return System

EnterCriticalArea() public static method

public static EnterCriticalArea ( ) : void
return void

GetClient() public method

public GetClient ( uint SessionID ) : SagaLib.Client
SessionID uint
return SagaLib.Client

LeaveCriticalArea() public static method

public static LeaveCriticalArea ( ) : void
return void

NetworkLoop() public method

public NetworkLoop ( int maxNewConnections ) : void
maxNewConnections int
return void

OnClientDisconnect() public method

public OnClientDisconnect ( SagaLib.Client client ) : void
client SagaLib.Client
return void

RemoveWaitingWaitress() public method

public RemoveWaitingWaitress ( ) : void
return void

Start() public method

public Start ( ) : void
return void

StartNetwork() public method

Starts the network listener socket.
public StartNetwork ( int port ) : bool
port int
return bool

Stop() public method

public Stop ( ) : void
return void

checkCriticalArea() public method

public checkCriticalArea ( ) : void
return void

packetCoordinationLoop() public method

public packetCoordinationLoop ( ) : void
return void

Property Details

commandTable public_oe property

Command table contains the commands that need to be called when a packet is received. Key will be the packet type
public Dictionary commandTable
return Packet>.Dictionary

enteredcriarea public_oe static_oe property

public static bool enteredcriarea
return bool

listener public_oe property

public TcpListener,System.Net.Sockets listener
return System.Net.Sockets.TcpListener

packetCoordinator public_oe property

public Thread packetCoordinator
return Thread

waitingWaitressesCount public_oe property

public uint waitingWaitressesCount
return uint

waitressCountLock public_oe property

public Object waitressCountLock
return Object

waitressHasFinished public_oe property

public ManualResetEvent,System.Threading waitressHasFinished
return System.Threading.ManualResetEvent

waitressQueue public_oe property

public AutoResetEvent,System.Threading waitressQueue
return System.Threading.AutoResetEvent