C# Class ChatService.ChatServer

Datei anzeigen Open project: aptana/frameworks Class Usage Examples

Public Methods

Method Description
NewConnection ( Socket sockClient ) : void

Add the given connection to our list of clients Note we have a new friend Send a welcome to the new client Setup a callback to recieve data

OnConnectRequest ( IAsyncResult ar ) : void

Callback used when a client requests a connection. Accpet the connection, adding it to our list and setup to accept more connections.

OnRecievedData ( IAsyncResult ar ) : void

Get the new data and send it out to all other connections. Note: If not data was recieved the connection has probably died.

start ( ) : void
stop ( ) : void

Method Details

NewConnection() public method

Add the given connection to our list of clients Note we have a new friend Send a welcome to the new client Setup a callback to recieve data
public NewConnection ( Socket sockClient ) : void
sockClient Socket Connection to keep
return void

OnConnectRequest() public method

Callback used when a client requests a connection. Accpet the connection, adding it to our list and setup to accept more connections.
public OnConnectRequest ( IAsyncResult ar ) : void
ar IAsyncResult
return void

OnRecievedData() public method

Get the new data and send it out to all other connections. Note: If not data was recieved the connection has probably died.
public OnRecievedData ( IAsyncResult ar ) : void
ar IAsyncResult
return void

start() public method

public start ( ) : void
return void

stop() public method

public stop ( ) : void
return void