C# Class ChatGatewaySample.ChatGateway

Extends the MediaGateway base service functions.
Inheritance: MediaGateway
Exibir arquivo Open project: thesameqad/pitchingtube Class Usage Examples

Public Methods

Method Description
ChatGateway ( MediaGatewayConfig configuration ) : System
GetConnectedClients ( IClient client, string requestOwnernickName ) : void

Sends the connected client list to the caller client.

OnClientConnect ( IClient client, object parameters ) : void

Indicates the client connection and registers it if the chatclient dictionary doesn't contain the client nickname.

OnClientDisconnect ( IClient client ) : void

Indicates client disconnection and remove client's keyvaluepair from chatclient.

OnStreamPublishStart ( IClient client, IMediaStream mediaStream ) : void

Indicates the client starts publish his IMediastream.

SendAudioRequest ( IClient client, string owner, string target, bool isEnable ) : void

Sends audio request to target client.

SendAudioResponse ( IClient client, string owner, string target, bool response ) : void

Sends response for a audio request.

SendCameraRequest ( IClient client, string owner, string target, bool isEnable ) : void

Sends camera request to target client.

SendCameraResponse ( IClient client, string owner, string target, bool response ) : void

Sends response for a camera request.

SendText ( IClient client, string owner, string target, string msg ) : void

Sends a text message to the target client.

Private Methods

Method Description
ConnectedClientChanged ( IClient requestClient ) : void

Notifies the clients about the connected client list changed.

Method Details

ChatGateway() public method

public ChatGateway ( MediaGatewayConfig configuration ) : System
configuration MediaGatewayConfig
return System

GetConnectedClients() public method

Sends the connected client list to the caller client.
public GetConnectedClients ( IClient client, string requestOwnernickName ) : void
client IClient That client reference who call this method.
requestOwnernickName string Caller client nickname
return void

OnClientConnect() public method

Indicates the client connection and registers it if the chatclient dictionary doesn't contain the client nickname.
public OnClientConnect ( IClient client, object parameters ) : void
client IClient That client reference who call this method.
parameters object Opional parameters
return void

OnClientDisconnect() public method

Indicates client disconnection and remove client's keyvaluepair from chatclient.
public OnClientDisconnect ( IClient client ) : void
client IClient That client reference who call this method.
return void

OnStreamPublishStart() public method

Indicates the client starts publish his IMediastream.
public OnStreamPublishStart ( IClient client, IMediaStream mediaStream ) : void
client IClient That client reference who call this method.
mediaStream IMediaStream Published IMediaStream
return void

SendAudioRequest() public method

Sends audio request to target client.
public SendAudioRequest ( IClient client, string owner, string target, bool isEnable ) : void
client IClient That client reference who call this method.
owner string Request owner
target string Client who receive the request.
isEnable bool Bool is indicates the audio start/stop state.
return void

SendAudioResponse() public method

Sends response for a audio request.
public SendAudioResponse ( IClient client, string owner, string target, bool response ) : void
client IClient That client reference who call this method.
owner string Client who sends the response.
target string Client who get the response.
response bool Bool what is indicates the audio request is accepted or rejected.
return void

SendCameraRequest() public method

Sends camera request to target client.
public SendCameraRequest ( IClient client, string owner, string target, bool isEnable ) : void
client IClient That client reference who call this method.
owner string Request owner
target string Client who receive the request.
isEnable bool Bool is indicates the camera start/stop state.
return void

SendCameraResponse() public method

Sends response for a camera request.
public SendCameraResponse ( IClient client, string owner, string target, bool response ) : void
client IClient That client reference who call this method.
owner string Client who sends the response.
target string Client who get the response.
response bool Bool what is indicates the camera request is accepted or rejected.
return void

SendText() public method

Sends a text message to the target client.
public SendText ( IClient client, string owner, string target, string msg ) : void
client IClient That client reference who call this method.
owner string source of text message
target string
msg string
return void