C# Class Enyim.Caching.Memcached.Protocol.Text.TextSocketHelper

Mostrar archivo Open project: xianrendzw/LightFramework.Net Class Usage Examples

Public Methods

Method Description
GetCommandBuffer ( string value ) : IList>

Gets the bytes representing the specified command. returned buffer can be used to streamline multiple writes into one Write on the Socket using the M:Enyim.Caching.Memcached.PooledSocket.Write(IList<ArraySegment<byte>>)

The Nagle algorithm is disabled on the socket to speed things up, so it's recommended to convert a command into a buffer and use the M:Enyim.Caching.Memcached.PooledSocket.Write(IList<ArraySegment<byte>>) to send the command and the additional buffers in one transaction.

GetCommandBuffer ( string value, IList list ) : IList>
ReadResponse ( PooledSocket socket ) : string

Reads the response of the server.

Private Methods

Method Description
ReadLine ( PooledSocket socket ) : string

Reads a line from the socket. A line is terninated by \r\n.

Method Details

GetCommandBuffer() public static method

Gets the bytes representing the specified command. returned buffer can be used to streamline multiple writes into one Write on the Socket using the M:Enyim.Caching.Memcached.PooledSocket.Write(IList<ArraySegment<byte>>)
The Nagle algorithm is disabled on the socket to speed things up, so it's recommended to convert a command into a buffer and use the M:Enyim.Caching.Memcached.PooledSocket.Write(IList<ArraySegment<byte>>) to send the command and the additional buffers in one transaction.
public static GetCommandBuffer ( string value ) : IList>
value string The command to be converted.
return IList>

GetCommandBuffer() public static method

public static GetCommandBuffer ( string value, IList list ) : IList>
value string
list IList
return IList>

ReadResponse() public static method

Reads the response of the server.
The server did not sent a response or an empty line was returned. The server did not specified any reason just returned the string ERROR. - or - The server returned a SERVER_ERROR, in this case the Message of the exception is the message returned by the server. The server did not recognize the request sent by the memcachedClient. The Message of the exception is the message returned by the server.
public static ReadResponse ( PooledSocket socket ) : string
socket PooledSocket
return string