C# Class GlowCommon.AppConnectionManager

Inheritance: IDiscoveryServerListener, ICommandServerListener
Exibir arquivo Open project: QuinnDamerell/Glow Class Usage Examples

Public Properties

Property Type Description
IsConnected bool

Public Methods

Method Description
AppConnectionManager ( ) : GlowCommon.Interfaces
OnClientFound ( string ipAddress ) : void

Called when a server is found! Try to connect.

OnCommand ( Command command ) : Command

Fired when the server sends a command

OnConnect ( ) : void

Fired when a new server connection has been made

OnDisconnected ( ) : void

Fired when a server connection has been lost

OnFatalError ( ) : void

Fired when there has been an error we can't recover from.

SendCommand ( Command cmd ) : Task

Called by the consumer when they want to send a message to the other side.

Private Methods

Method Description
CreateDiscoveryPingTimmer ( ) : void

Used to create a tick timer for the broadcast pinger

DestoryDiscoverPingTimer ( ) : void

Used to stop the timer for the ping timer.

Method Details

AppConnectionManager() public method

public AppConnectionManager ( ) : GlowCommon.Interfaces
return GlowCommon.Interfaces

OnClientFound() public method

Called when a server is found! Try to connect.
public OnClientFound ( string ipAddress ) : void
ipAddress string
return void

OnCommand() public method

Fired when the server sends a command
public OnCommand ( Command command ) : Command
command GlowCommon.DataObjects.Command
return GlowCommon.DataObjects.Command

OnConnect() public method

Fired when a new server connection has been made
public OnConnect ( ) : void
return void

OnDisconnected() public method

Fired when a server connection has been lost
public OnDisconnected ( ) : void
return void

OnFatalError() public method

Fired when there has been an error we can't recover from.
public OnFatalError ( ) : void
return void

SendCommand() public method

Called by the consumer when they want to send a message to the other side.
public SendCommand ( Command cmd ) : Task
cmd GlowCommon.DataObjects.Command
return Task

Property Details

IsConnected public_oe property

Indicates if we are connected or not.
public bool IsConnected
return bool