C# Class Enyim.Caching.Memcached.PooledSocket

Inheritance: IDisposable
Mostra file Open project: enyim/EnyimMemcached Class Usage Examples

Public Properties

Property Type Description
InstanceId System.Guid

Public Methods

Method Description
Destroy ( ) : void

Releases all resources used by this instance and shuts down the inner T:Socket. This instance will not be usable anymore.

Use the IDisposable.Dispose method if you want to release this instance back into the pool.

PooledSocket ( IPEndPoint endpoint, System.TimeSpan connectionTimeout, System.TimeSpan receiveTimeout, System.TimeSpan keepAliveStartDelay, System.TimeSpan keepAliveInterval ) : System
Read ( byte buffer, int offset, int count ) : void

Reads data from the server into the specified buffer.

This method blocks and will not return until the specified amount of bytes are read.

ReadByte ( ) : int

Reads the next byte from the server's response.

This method blocks and will not return until the value is read.

ReceiveAsync ( AsyncIOArgs p ) : bool

Receives data asynchronously. Returns true if the IO is pending. Returns false if the socket already failed or the data was available in the buffer. p.Next will only be called if the call completes asynchronously.

Reset ( ) : void
Write ( IList buffers ) : void
Write ( byte data, int offset, int length ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
CheckDisposed ( ) : void
ConfigureKeepAlive ( Socket socket, System.TimeSpan keepAliveStartFrom, System.TimeSpan keepAliveInterval ) : void
ConnectWithTimeout ( Socket socket, IPEndPoint endpoint, int timeout ) : void
IDisposable ( ) : void

Method Details

Destroy() public method

Releases all resources used by this instance and shuts down the inner T:Socket. This instance will not be usable anymore.
Use the IDisposable.Dispose method if you want to release this instance back into the pool.
public Destroy ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

PooledSocket() public method

public PooledSocket ( IPEndPoint endpoint, System.TimeSpan connectionTimeout, System.TimeSpan receiveTimeout, System.TimeSpan keepAliveStartDelay, System.TimeSpan keepAliveInterval ) : System
endpoint System.Net.IPEndPoint
connectionTimeout System.TimeSpan
receiveTimeout System.TimeSpan
keepAliveStartDelay System.TimeSpan
keepAliveInterval System.TimeSpan
return System

Read() public method

Reads data from the server into the specified buffer.
This method blocks and will not return until the specified amount of bytes are read.
public Read ( byte buffer, int offset, int count ) : void
buffer byte An array of that is the storage location for the received data.
offset int The location in buffer to store the received data.
count int The number of bytes to read.
return void

ReadByte() public method

Reads the next byte from the server's response.
This method blocks and will not return until the value is read.
public ReadByte ( ) : int
return int

ReceiveAsync() public method

Receives data asynchronously. Returns true if the IO is pending. Returns false if the socket already failed or the data was available in the buffer. p.Next will only be called if the call completes asynchronously.
public ReceiveAsync ( AsyncIOArgs p ) : bool
p AsyncIOArgs
return bool

Reset() public method

public Reset ( ) : void
return void

Write() public method

public Write ( IList buffers ) : void
buffers IList
return void

Write() public method

public Write ( byte data, int offset, int length ) : void
data byte
offset int
length int
return void

Property Details

InstanceId public_oe property

The ID of this instance. Used by the T:MemcachedServer to identify the instance in its inner lists.
public Guid,System InstanceId
return System.Guid