C# 클래스 OpenStory.Server.Processing.ClientBase

Represents a base class for all server clients.
This class is abstract.
상속: IDisposable
파일 보기 프로젝트 열기: shoftee/OpenStory

공개 메소드들

메소드 설명
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