C# Class WindowsDefender_WebApp.ChatHub

Inheritance: Microsoft.AspNet.SignalR.Hub
Show file Open project: Good4m/WindowsDefender

Public Methods

Method Description
CancelLaunch ( ) : void

Sends a chat message to everyone in the user's match with format: 'Name: message'

OnConnected ( ) : System.Threading.Tasks.Task

New user has connected.

OnDisconnected ( bool stopCalled ) : System.Threading.Tasks.Task

User has disconnected.

OnReconnected ( ) : System.Threading.Tasks.Task

User has reconnected.

Ready ( bool isReady ) : void

When the user presses the Ready button.

SendChatMessage ( string message ) : void

Sends a chat message to everyone in the user's match with format: 'Name: message'

SendToMatch ( string message ) : void

Sends a message to everyone in a match, including the user who sent it.

SendToUser ( string connectionId, string message ) : void

Sends a message to a single user.

UpdateMatchUserLists ( Match match ) : void

Sends the current userlist to everyone in a match.

UpdateReadyCount ( Match match ) : void

Sends the current readylist to everyone in a match.

Private Methods

Method Description
CreateMatch ( ) : Match

Creates an new empty match.

CreateUser ( ) : void

Creates a new user in the _users dictionary.

FindMatch ( ) : void

Finds a match for the user.

SendToMatchExcept ( string matchId, string message ) : void

Sends to everyone in a match except the current user.

Method Details

CancelLaunch() public method

Sends a chat message to everyone in the user's match with format: 'Name: message'
public CancelLaunch ( ) : void
return void

OnConnected() public method

New user has connected.
public OnConnected ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

OnDisconnected() public method

User has disconnected.
public OnDisconnected ( bool stopCalled ) : System.Threading.Tasks.Task
stopCalled bool
return System.Threading.Tasks.Task

OnReconnected() public method

User has reconnected.
public OnReconnected ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

Ready() public method

When the user presses the Ready button.
public Ready ( bool isReady ) : void
isReady bool
return void

SendChatMessage() public method

Sends a chat message to everyone in the user's match with format: 'Name: message'
public SendChatMessage ( string message ) : void
message string
return void

SendToMatch() public method

Sends a message to everyone in a match, including the user who sent it.
public SendToMatch ( string message ) : void
message string
return void

SendToUser() public method

Sends a message to a single user.
public SendToUser ( string connectionId, string message ) : void
connectionId string
message string
return void

UpdateMatchUserLists() public method

Sends the current userlist to everyone in a match.
public UpdateMatchUserLists ( Match match ) : void
match Match
return void

UpdateReadyCount() public method

Sends the current readylist to everyone in a match.
public UpdateReadyCount ( Match match ) : void
match Match
return void