C# 클래스 OpenStory.Networking.EncryptedNetworkSession

상속: INetworkSession, IDisposable
파일 보기 프로젝트 열기: shoftee/OpenStory

공개 메소드들

메소드 설명
AttachSocket ( Socket sessionSocket ) : void

Attaches a Socket to this session.

Close ( string reason ) : void

Closes the session.

Dispose ( ) : void
ToString ( ) : string
WritePacket ( byte packet ) : void

Encrypts the given data as a packet and writes it to the network stream.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Runs the disposal operations for the base class.

EncryptedNetworkSession ( ) : System

Initializes a new instance of the EncryptedNetworkSession class with no specified socket.

Call AttachSocket(Socket) before starting the network operations.

OnDataArrived ( object sender, DataArrivedEventArgs args ) : void

Called when the PacketReceived event is raised.

When overriding this method in a derived class, call the base implementation after your logic.

ThrowIfNoPacketReceivedSubscriber ( ) : void

Checks if the PacketReceived event has a subscriber and throws InvalidOperationException if not.

비공개 메소드들

메소드 설명
CreateInnerSession ( ) : NetworkSession
OnClosing ( object sender, ConnectionClosingEventArgs e ) : void
OnPacketReceived ( PacketReceivedEventArgs args ) : void
OnSocketError ( object sender, SocketErrorEventArgs e ) : void

메소드 상세

AttachSocket() 공개 메소드

Attaches a Socket to this session.
public AttachSocket ( Socket sessionSocket ) : void
sessionSocket System.Net.Sockets.Socket The to attach.
리턴 void

Close() 공개 메소드

Closes the session.
public Close ( string reason ) : void
reason string
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Runs the disposal operations for the base class.
protected Dispose ( bool disposing ) : void
disposing bool Whether the method is being called for disposal or finalization.
리턴 void

EncryptedNetworkSession() 보호된 메소드

Initializes a new instance of the EncryptedNetworkSession class with no specified socket.
Call AttachSocket(Socket) before starting the network operations.
protected EncryptedNetworkSession ( ) : System
리턴 System

OnDataArrived() 보호된 메소드

Called when the PacketReceived event is raised.
When overriding this method in a derived class, call the base implementation after your logic.
Thrown if is .
protected OnDataArrived ( object sender, DataArrivedEventArgs args ) : void
sender object The sender of the event.
args DataArrivedEventArgs The packet data that was received.
리턴 void

ThrowIfNoPacketReceivedSubscriber() 보호된 메소드

Checks if the PacketReceived event has a subscriber and throws InvalidOperationException if not.
protected ThrowIfNoPacketReceivedSubscriber ( ) : void
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

WritePacket() 공개 메소드

Encrypts the given data as a packet and writes it to the network stream.
/// Thrown if is . ///
public WritePacket ( byte packet ) : void
packet byte The data to send.
리턴 void