C# 클래스 WebSocketServer.Client

Represents a single client connected to the game server. This class also handles the send/receive for the web socket connection.
상속: IDisposable
파일 보기 프로젝트 열기: qJake/planning-poker 1 사용 예제들

공개 메소드들

메소드 설명
Client ( CardServer parent, WebSocketConnection connection ) : System

Initializes a new instance of the Client class with the specified game server and underlying web socket connection.

Dispose ( ) : void

Closes the web socket connection and disposes of this client.

SendError ( string source, string message ) : void

Sends an error through the underlying web socket connection to the browser/client.

SendMessage ( string command ) : void

Sends a message through the underlying web socket connection to the browser/client.

비공개 메소드들

메소드 설명
Connected ( ) : void

Event handler method for the "OnOpen" event from the web socket.

DiscardActiveRound ( ) : void
Disconnected ( ) : void

Event handler method for the "OnClose" event from the web socket.

FinalizeVote ( string vote ) : void
FlipCards ( ) : void
GetCardList ( ) : void
NewRoundRequest ( string title ) : void
ReceiveMessage ( string message ) : void

Event handler method for the "OnMessage" event from the web socket.

RegisterAdmin ( string pass ) : void
RegisterClient ( string name, string spectator ) : void
RegisterVote ( string vote ) : void
RestartRound ( ) : void
SetCards ( string newCards ) : void
SetSetting ( string key, string value ) : void
SortCards ( ) : void
SwapSpectator ( ) : void
TakeMajority ( ) : void
UndoVote ( ) : void

메소드 상세

Client() 공개 메소드

Initializes a new instance of the Client class with the specified game server and underlying web socket connection.
public Client ( CardServer parent, WebSocketConnection connection ) : System
parent CardServer The game server that this client is connected to.
connection WebSocketConnection The underlying web socket connection that is associated with this client.
리턴 System

Dispose() 공개 메소드

Closes the web socket connection and disposes of this client.
public Dispose ( ) : void
리턴 void

SendError() 공개 메소드

Sends an error through the underlying web socket connection to the browser/client.
public SendError ( string source, string message ) : void
source string The source of the error.
message string The error message.
리턴 void

SendMessage() 공개 메소드

Sends a message through the underlying web socket connection to the browser/client.
public SendMessage ( string command ) : void
command string The command to send.
리턴 void