C# Класс OpenStory.Server.Processing.ClientBase

Represents a base class for all server clients.
This class is abstract.
Наследование: IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
Disconnect ( string reason = null ) : void

Immediately disconnects the client from the server.

Dispose ( ) : void
WritePacket ( byte data ) : void

Writes a packet to the client's stream.

Защищенные методы

Метод Описание
ClientBase ( IServerSession serverSession, IPacketFactory packetFactory, ILogger logger ) : System

Initializes a new instance of the ClientBase class.

ProcessPacket ( PacketProcessingEventArgs args ) : void

When implemented in a derived class, processes the provided packet data.

Приватные методы

Метод Описание
HandlePacket ( PacketProcessingEventArgs e ) : void
HandlePong ( ) : void
InitializeSession ( IServerSession serverSession ) : IServerSession
InitializeTimer ( ) : Timer
LogDisconnectReason ( IAccountSession session, string reason ) : void
OnClosing ( ) : void
OnPacketProcessing ( object sender, PacketProcessingEventArgs e ) : void
OnSessionClosing ( object sender, ConnectionClosingEventArgs e ) : void
SendPing ( object sender, System.Timers.ElapsedEventArgs e ) : void

Описание методов

ClientBase() защищенный Метод

Initializes a new instance of the ClientBase class.
Thrown if any of the parameters is .
protected ClientBase ( IServerSession serverSession, IPacketFactory packetFactory, ILogger logger ) : System
serverSession IServerSession The network session to bind the instance to.
packetFactory IPacketFactory The to use for this client.
logger ILogger The logger to use for this client.
Результат System

Disconnect() публичный Метод

Immediately disconnects the client from the server.
public Disconnect ( string reason = null ) : void
reason string The reason for the disconnection.
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

ProcessPacket() защищенный абстрактный Метод

When implemented in a derived class, processes the provided packet data.
protected abstract ProcessPacket ( PacketProcessingEventArgs args ) : void
args OpenStory.Framework.Contracts.PacketProcessingEventArgs The packet to be processed.
Результат void

WritePacket() публичный Метод

Writes a packet to the client's stream.
public WritePacket ( byte data ) : void
data byte The data of the packet.
Результат void