C# Класс Whalin.Caching.Memcached.SockIO

Memcached C# memcachedClient, utility class for Socket IO. This class is a wrapper around a Socket and its streams.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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