C# Class OpenStory.Networking.DescriptorBase

Represents an abstract asynchronous network operation buffer.
Inheritance: IDisposable
Exibir arquivo Open project: shoftee/OpenStory

Public Methods

Method Description
Close ( ) : void

Closes the DescriptorBase instance.

Dispose ( ) : void

Protected Methods

Method Description
DescriptorBase ( IDescriptorContainer container ) : System

Initializes a new instance of the DescriptorBase class.

This constructor initializes the Container and SocketArgs properties.

Dispose ( bool disposing ) : void

Called when the instance is being released.

OnClosed ( ) : void

A hook to the end of the publicly exposed Close() method.

OnError ( SocketAsyncEventArgs args ) : void

Raises the Error event and closes the connection.

The event will be raised only if it has subscribers and the SocketAsyncEventArgs.SocketError property of args is not SocketError.Success.

Method Details

Close() public method

Closes the DescriptorBase instance.
public Close ( ) : void
return void

DescriptorBase() protected method

Initializes a new instance of the DescriptorBase class.
This constructor initializes the Container and SocketArgs properties.
/// Thrown if is . ///
protected DescriptorBase ( IDescriptorContainer container ) : System
container IDescriptorContainer The container of this descriptor.
return System

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

Called when the instance is being released.
protected Dispose ( bool disposing ) : void
disposing bool Whether we are disposing or finalizing the instance.
return void

OnClosed() protected abstract method

A hook to the end of the publicly exposed Close() method.
protected abstract OnClosed ( ) : void
return void

OnError() protected method

Raises the Error event and closes the connection.
The event will be raised only if it has subscribers and the SocketAsyncEventArgs.SocketError property of args is not SocketError.Success.
/// Thrown if is . ///
protected OnError ( SocketAsyncEventArgs args ) : void
args System.Net.Sockets.SocketAsyncEventArgs /// A object for the operation that caused the error. ///
return void