C# 클래스 MemcachedClientLibrary.PooledSocket

The PooledSocket class encapsulates a socket connection to a specified memcached server. It contains a buffered stream for communication, and methods for sending and retrieving data from the memcached server, as well as general memcached error checking.
상속: IDisposable
파일 보기 프로젝트 열기: noear/Weed3 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Created System.DateTime

공개 메소드들

메소드 설명
Close ( ) : void

This method closes the underlying stream and socket.

Dispose ( ) : void

Disposing of a PooledSocket object in any way causes it to be returned to its SocketPool.

PooledSocket ( SocketPool socketPool, IPEndPoint endPoint, int sendReceiveTimeout ) : System
Read ( byte bytes ) : void

Fills the given byte array with data from the socket.

ReadLine ( ) : string

Reads from the socket until the sequence '\r\n' is encountered, and returns everything up to but not including that sequence as a UTF8-encoded string

ReadResponse ( ) : string

Reads a response line from the socket, checks for general memcached errors, and returns the line. If an error is encountered, this method will throw an exception.

Reset ( ) : bool

Resets this PooledSocket by making sure the incoming buffer of the socket is empty. If there was any leftover data, this method return true.

SkipUntilEndOfLine ( ) : void

Reads from the socket until the sequence '\r\n' is encountered.

Write ( byte bytes ) : void

Writes an array of bytes to the socket and flushes the stream.

Write ( string str ) : void

Writes a string to the socket encoded in UTF8 format.

메소드 상세

Close() 공개 메소드

This method closes the underlying stream and socket.
public Close ( ) : void
리턴 void

Dispose() 공개 메소드

Disposing of a PooledSocket object in any way causes it to be returned to its SocketPool.
public Dispose ( ) : void
리턴 void

PooledSocket() 공개 메소드

public PooledSocket ( SocketPool socketPool, IPEndPoint endPoint, int sendReceiveTimeout ) : System
socketPool SocketPool
endPoint System.Net.IPEndPoint
sendReceiveTimeout int
리턴 System

Read() 공개 메소드

Fills the given byte array with data from the socket.
public Read ( byte bytes ) : void
bytes byte
리턴 void

ReadLine() 공개 메소드

Reads from the socket until the sequence '\r\n' is encountered, and returns everything up to but not including that sequence as a UTF8-encoded string
public ReadLine ( ) : string
리턴 string

ReadResponse() 공개 메소드

Reads a response line from the socket, checks for general memcached errors, and returns the line. If an error is encountered, this method will throw an exception.
public ReadResponse ( ) : string
리턴 string

Reset() 공개 메소드

Resets this PooledSocket by making sure the incoming buffer of the socket is empty. If there was any leftover data, this method return true.
public Reset ( ) : bool
리턴 bool

SkipUntilEndOfLine() 공개 메소드

Reads from the socket until the sequence '\r\n' is encountered.
public SkipUntilEndOfLine ( ) : void
리턴 void

Write() 공개 메소드

Writes an array of bytes to the socket and flushes the stream.
public Write ( byte bytes ) : void
bytes byte
리턴 void

Write() 공개 메소드

Writes a string to the socket encoded in UTF8 format.
public Write ( string str ) : void
str string
리턴 void

프로퍼티 상세

Created 공개적으로 프로퍼티

public DateTime,System Created
리턴 System.DateTime