Метод | Описание | |
---|---|---|
AttachSocket ( |
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, |
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 ( ) : |
||
OnClosing ( object sender, |
||
OnPacketReceived ( |
||
OnSocketError ( object sender, |
public AttachSocket ( |
||
sessionSocket | The |
|
Результат | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | Whether the method is being called for disposal or finalization. |
Результат | void |
protected EncryptedNetworkSession ( ) : System | ||
Результат | System |
protected OnDataArrived ( object sender, |
||
sender | object | The sender of the event. |
args | The packet data that was received. | |
Результат | void |
protected ThrowIfNoPacketReceivedSubscriber ( ) : void | ||
Результат | void |
public WritePacket ( byte packet ) : void | ||
packet | byte | The data to send. |
Результат | void |