C# Class LKCamelot.Server

Show file Open project: vans163/LKEmu Class Usage Examples

Public Properties

Property Type Description
ClientHandler Server
IOThread LKCamelot.io.IOThread
WebServer WebSocketListener
playerHandler LKCamelot.model.PlayerHandler
shutdownClientHandler bool
shutdownServer bool
tickcount Stopwatch
world World

Protected Properties

Property Type Description
ConnectionLock object
Connections List
Listener Socket

Public Methods

Method Description
App_ThreadException ( object sender, UnhandledExceptionEventArgs e ) : void
CurrentTimeMillis ( ) : long
Disconnect ( Connection connection ) : void
Listen ( string bindIP, int port ) : bool
OnConnecte ( object sender, ConnectionEventArgs e ) : void
OnDisconnecte ( object sender, ConnectionEventArgs e ) : void
Send ( Connection connection, byte buffer, int start, int count, SocketFlags flags ) : int
killServer ( ) : void
run ( ) : void

Protected Methods

Method Description
OnClientConnection ( ConnectionEventArgs e ) : void
OnClientDisconnect ( ConnectionEventArgs e ) : void
OnDataReceived ( ConnectionDataEventArgs e ) : void
OnDataSent ( ConnectionDataEventArgs e ) : void

Private Methods

Method Description
GameServer_DataReceived ( object sender, ConnectionDataEventArgs e ) : void
InitRoutine ( ) : void
Main ( string args ) : void
NotifyRemoveConnection ( Connection connection ) : void
RemoveConnection ( Connection connection, bool raiseEvent ) : void
acceptCallback ( IAsyncResult result ) : void
domain_ProcessExit ( object sender, EventArgs e ) : void
readCallback ( IAsyncResult result ) : void

Method Details

App_ThreadException() public static method

public static App_ThreadException ( object sender, UnhandledExceptionEventArgs e ) : void
sender object
e System.UnhandledExceptionEventArgs
return void

CurrentTimeMillis() public static method

public static CurrentTimeMillis ( ) : long
return long

Disconnect() public method

public Disconnect ( Connection connection ) : void
connection Connection
return void

Listen() public method

public Listen ( string bindIP, int port ) : bool
bindIP string
port int
return bool

OnClientConnection() protected method

protected OnClientConnection ( ConnectionEventArgs e ) : void
e ConnectionEventArgs
return void

OnClientDisconnect() protected method

protected OnClientDisconnect ( ConnectionEventArgs e ) : void
e ConnectionEventArgs
return void

OnConnecte() public method

public OnConnecte ( object sender, ConnectionEventArgs e ) : void
sender object
e ConnectionEventArgs
return void

OnDataReceived() protected method

protected OnDataReceived ( ConnectionDataEventArgs e ) : void
e ConnectionDataEventArgs
return void

OnDataSent() protected method

protected OnDataSent ( ConnectionDataEventArgs e ) : void
e ConnectionDataEventArgs
return void

OnDisconnecte() public method

public OnDisconnecte ( object sender, ConnectionEventArgs e ) : void
sender object
e ConnectionEventArgs
return void

Send() public method

public Send ( Connection connection, byte buffer, int start, int count, SocketFlags flags ) : int
connection Connection
buffer byte
start int
count int
flags SocketFlags
return int

killServer() public method

public killServer ( ) : void
return void

run() public method

public run ( ) : void
return void

Property Details

ClientHandler public static property

public static Server,LKCamelot ClientHandler
return Server

ConnectionLock protected property

protected object ConnectionLock
return object

Connections protected property

protected List Connections
return List

IOThread public static property

public static IOThread,LKCamelot.io IOThread
return LKCamelot.io.IOThread

Listener protected property

protected Socket Listener
return Socket

WebServer public static property

public static WebSocketListener,LKCamelot WebServer
return WebSocketListener

playerHandler public static property

public static PlayerHandler,LKCamelot.model playerHandler
return LKCamelot.model.PlayerHandler

shutdownClientHandler public static property

public static bool shutdownClientHandler
return bool

shutdownServer public static property

public static bool shutdownServer
return bool

tickcount public static property

public static Stopwatch tickcount
return Stopwatch

world public static property

public static World world
return World