C# 클래스 Whalin.Caching.Memcached.SockIO

Memcached C# memcachedClient, utility class for Socket IO. This class is a wrapper around a Socket and its streams.
파일 보기 프로젝트 열기: xianrendzw/LightFramework.Net 1 사용 예제들

공개 메소드들

메소드 설명
ClearEndOfLine ( ) : void

reads up to end of line and returns nothing

Close ( ) : void

sets closed flag and checks in to connection sockIOPool but does not close connections

Flush ( ) : void

flushes output stream

Read ( byte bytes ) : void

reads length bytes into the passed in byte array from stream

ReadLine ( ) : string

reads a line intentionally not using the deprecated readLine method from DataInputStream

SockIO ( SockIOPool pool, String host, int timeout, int connectTimeout, bool noDelay ) : System

creates a new SockIO object wrapping a socket connection to host:port, and its input and output streams

SockIO ( SockIOPool pool, String host, int port, int timeout, int connectTimeout, bool noDelay ) : System

creates a new SockIO object wrapping a socket connection to host:port, and its input and output streams

ToString ( ) : string

returns the string representation of this socket

TrueClose ( ) : void

closes socket and all streams connected to it

Write ( byte bytes ) : void

writes a byte array to the output stream

Write ( byte bytes, int offset, int count ) : void

writes a byte array to the output stream

보호된 메소드들

메소드 설명
GetSocket ( String host, int port, int timeout ) : Socket

Method which spawns thread to get a connection and then enforces a timeout on the initial connection. This should be backed by a thread sockIOPool. Any volunteers?

비공개 메소드들

메소드 설명
GetLocalizedString ( string key ) : string
SockIO ( ) : System

메소드 상세

ClearEndOfLine() 공개 메소드

reads up to end of line and returns nothing
public ClearEndOfLine ( ) : void
리턴 void

Close() 공개 메소드

sets closed flag and checks in to connection sockIOPool but does not close connections
public Close ( ) : void
리턴 void

Flush() 공개 메소드

flushes output stream
public Flush ( ) : void
리턴 void

GetSocket() 보호된 정적인 메소드

Method which spawns thread to get a connection and then enforces a timeout on the initial connection. This should be backed by a thread sockIOPool. Any volunteers?
protected static GetSocket ( String host, int port, int timeout ) : Socket
host String host to establish connection to
port int port on that host
timeout int connection timeout in ms
리턴 Socket

Read() 공개 메소드

reads length bytes into the passed in byte array from stream
public Read ( byte bytes ) : void
bytes byte
리턴 void

ReadLine() 공개 메소드

reads a line intentionally not using the deprecated readLine method from DataInputStream
public ReadLine ( ) : string
리턴 string

SockIO() 공개 메소드

creates a new SockIO object wrapping a socket connection to host:port, and its input and output streams
public SockIO ( SockIOPool pool, String host, int timeout, int connectTimeout, bool noDelay ) : System
pool SockIOPool
host String hostname:port
timeout int read timeout value for connected socket
connectTimeout int timeout for initial connections
noDelay bool TCP NODELAY option?
리턴 System

SockIO() 공개 메소드

creates a new SockIO object wrapping a socket connection to host:port, and its input and output streams
public SockIO ( SockIOPool pool, String host, int port, int timeout, int connectTimeout, bool noDelay ) : System
pool SockIOPool
host String host to connect to
port int port to connect to
timeout int int ms to block on data for read
connectTimeout int timeout (in ms) for initial connection
noDelay bool TCP NODELAY option?
리턴 System

ToString() 공개 메소드

returns the string representation of this socket
public ToString ( ) : string
리턴 string

TrueClose() 공개 메소드

closes socket and all streams connected to it
public TrueClose ( ) : void
리턴 void

Write() 공개 메소드

writes a byte array to the output stream
public Write ( byte bytes ) : void
bytes byte byte array to write
리턴 void

Write() 공개 메소드

writes a byte array to the output stream
public Write ( byte bytes, int offset, int count ) : void
bytes byte byte array to write
offset int offset to begin writing from
count int count of bytes to write
리턴 void