C# 클래스 Descent.Messaging.AsyncSockets.AsyncSocketsServer

Implementation of the asynchronous sockets server.
파일 보기 프로젝트 열기: nezbo/Descent

공개 메소드들

메소드 설명
AsyncSocketsServer ( int port ) : System

Initializes a new instance of the AsyncSocketsServer class.

Broadcast ( string message ) : void

Broadcast a string to all connected clients.

BroadcastExceptClient ( string message, int clientId ) : void

Broadcast a string to all connected clients except one.

Close ( ) : void
Start ( ) : void

Start listening and accepting clients.

비공개 메소드들

메소드 설명
AcceptCallback ( IAsyncResult asyncResult ) : void

Called when a client was connected.

ClientConnectionDisconnected ( ClientInfo clientInfo ) : void

Called when a client disconnects. Removes the client from the collection.

메소드 상세

AsyncSocketsServer() 공개 메소드

Initializes a new instance of the AsyncSocketsServer class.
public AsyncSocketsServer ( int port ) : System
port int /// Port that the server should use. ///
리턴 System

Broadcast() 공개 메소드

Broadcast a string to all connected clients.
public Broadcast ( string message ) : void
message string The string to broadcast
리턴 void

BroadcastExceptClient() 공개 메소드

Broadcast a string to all connected clients except one.
public BroadcastExceptClient ( string message, int clientId ) : void
message string The string to broadcast
clientId int The client which the server shouldn't send to.
리턴 void

Close() 공개 메소드

public Close ( ) : void
리턴 void

Start() 공개 메소드

Start listening and accepting clients.
public Start ( ) : void
리턴 void