C# Class GladNet.Engine.Common.Peer

Base class for all network Peers or Sessions in GladNet.
Inheritance: INetPeer, IClassLogger, IDisconnectable
Exibir arquivo Open project: HelloKitty/GladNet2 Class Usage Examples

Public Methods

Method Description
CanSend ( OperationType opType ) : bool

Indicates if the OperationType can be sent with this peer.

Disconnect ( ) : void

Disconnects the Peer object.

Protected Methods

Method Description
OnStatusChanged ( NetStatus status ) : void

Called when NetStatus Status changes. Can be overriden to preform actions in child classes.

Peer ( ILog logger, INetworkMessageRouterService messageSender, IConnectionDetails details, INetworkMessageSubscriptionService subService, IDisconnectionServiceHandler disconnectHandler ) : System

Private Methods

Method Description
OnReceiveStatus ( IStatusMessage message, IMessageParameters parameters ) : void

Internally managed status receival method. Setup to be called internally using the INetworkMessageSubscriptionService.

Method Details

CanSend() public method

Indicates if the OperationType can be sent with this peer.
public CanSend ( OperationType opType ) : bool
opType OperationType to check.
return bool

Disconnect() public method

Disconnects the Peer object.
public Disconnect ( ) : void
return void

OnStatusChanged() protected method

Called when NetStatus Status changes. Can be overriden to preform actions in child classes.
protected OnStatusChanged ( NetStatus status ) : void
status NetStatus The new of the instance.
return void

Peer() protected method

protected Peer ( ILog logger, INetworkMessageRouterService messageSender, IConnectionDetails details, INetworkMessageSubscriptionService subService, IDisconnectionServiceHandler disconnectHandler ) : System
logger ILog
messageSender INetworkMessageRouterService
details IConnectionDetails
subService INetworkMessageSubscriptionService
disconnectHandler IDisconnectionServiceHandler
return System