C# Класс OpenStory.Networking.SendDescriptor

Наследование: DescriptorBase
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
SendDescriptor ( IDescriptorContainer container ) : System

Initializes a new instance of the SendDescriptor class.

Write ( byte data ) : void

Writes a byte array to the stream.

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

Метод Описание
OnClosed ( ) : void

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

Метод Описание
BeginSend ( ) : void
EndSendAsynchronous ( object sender, SocketAsyncEventArgs args ) : void

Asynchronous EndSend, also the callback for the Completed event.

If there is more data to send, this method will call BeginSend().

EndSendSynchronous ( SocketAsyncEventArgs args ) : bool

Synchronous EndSend.

This method will return true if there is more data to send. If there is no more data or if there was a connection error, it will return false.

HandleTransferredData ( SocketAsyncEventArgs args ) : bool

Handles the data which was transferred using the given SocketAsyncEventArgs object.

This method advances the sentBytes field forward and moves to the next segment in the queue if the current has finished sending.

If there was a connection error, this method will return . If all the queued data has been sent, this method will set isSending to and return . Otherwise it will return .

ResetBuffer ( ) : void

Looks at the current segment and adjusts the SocketArgs buffer to it.

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

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

protected OnClosed ( ) : void
Результат void

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

Initializes a new instance of the SendDescriptor class.
/// Thrown if is . ///
public SendDescriptor ( IDescriptorContainer container ) : System
container IDescriptorContainer The containing this instance.
Результат System

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

Writes a byte array to the stream.
/// Thrown if this session is not open. /// /// Thrown if is . ///
public Write ( byte data ) : void
data byte The data to write.
Результат void