C# Class ChatService.ChatServer

Afficher le fichier Open project: aptana/frameworks Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat void

OnConnectRequest() public méthode

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
Résultat void

OnRecievedData() public méthode

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
Résultat void

start() public méthode

public start ( ) : void
Résultat void

stop() public méthode

public stop ( ) : void
Résultat void