C# Class Agnos.Transports.BaseTransport

implements the common logic that is shared between (virtually) all concrete transports
Inheritance: ITransport
Show file Open project: tomerfiliba/agnos

Protected Properties

Property Type Description
compressionBuffer System.IO.MemoryStream
compressionThreshold int
inStream Stream
outStream Stream
readStream Agnos.Utils.BoundInputStream
rlock Agnos.Utils.ReentrantLock
wbuffer System.IO.MemoryStream
wlock Agnos.Utils.ReentrantLock
wseq int

Public Methods

Method Description
BaseTransport ( Stream inOutStream ) : System.Text
BaseTransport ( Stream inStream, Stream outStream ) : System.Text
BeginRead ( ) : int
BeginWrite ( int seq ) : void
CancelWrite ( ) : void
Close ( ) : void
DisableCompression ( ) : void
Dispose ( ) : void
EnableCompression ( ) : bool
EndRead ( ) : void
EndWrite ( ) : void
GetInputStream ( ) : Stream
GetOutputStream ( ) : Stream
IsCompressionEnabled ( ) : bool
Read ( byte data, int offset, int len ) : int
RestartWrite ( ) : void
Write ( byte data, int offset, int len ) : void

Protected Methods

Method Description
AssertBeganRead ( ) : void
AssertBeganWrite ( ) : void
getCompressionThreshold ( ) : int

returns the compression threshold (packets larger than this threshold will be compressed). this method is expected to be overriden by implementing classes

readSInt32 ( Stream stream ) : int
writeSInt32 ( Stream stream, int val ) : void

Private Methods

Method Description
repr ( byte arr ) : String
repr ( byte arr, int offset, int len ) : String

Method Details

AssertBeganRead() protected method

protected AssertBeganRead ( ) : void
return void

AssertBeganWrite() protected method

protected AssertBeganWrite ( ) : void
return void

BaseTransport() public method

public BaseTransport ( Stream inOutStream ) : System.Text
inOutStream Stream
return System.Text

BaseTransport() public method

public BaseTransport ( Stream inStream, Stream outStream ) : System.Text
inStream Stream
outStream Stream
return System.Text

BeginRead() public method

public BeginRead ( ) : int
return int

BeginWrite() public method

public BeginWrite ( int seq ) : void
seq int
return void

CancelWrite() public method

public CancelWrite ( ) : void
return void

Close() public method

public Close ( ) : void
return void

DisableCompression() public method

public DisableCompression ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

EnableCompression() public method

public EnableCompression ( ) : bool
return bool

EndRead() public method

public EndRead ( ) : void
return void

EndWrite() public method

public EndWrite ( ) : void
return void

GetInputStream() public method

public GetInputStream ( ) : Stream
return Stream

GetOutputStream() public method

public GetOutputStream ( ) : Stream
return Stream

IsCompressionEnabled() public method

public IsCompressionEnabled ( ) : bool
return bool

Read() public method

public Read ( byte data, int offset, int len ) : int
data byte
offset int
len int
return int

RestartWrite() public method

public RestartWrite ( ) : void
return void

Write() public method

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

getCompressionThreshold() protected method

returns the compression threshold (packets larger than this threshold will be compressed). this method is expected to be overriden by implementing classes
protected getCompressionThreshold ( ) : int
return int

readSInt32() protected static method

protected static readSInt32 ( Stream stream ) : int
stream Stream
return int

writeSInt32() protected static method

protected static writeSInt32 ( Stream stream, int val ) : void
stream Stream
val int
return void

Property Details

compressionBuffer protected property

protected MemoryStream,System.IO compressionBuffer
return System.IO.MemoryStream

compressionThreshold protected property

protected int compressionThreshold
return int

inStream protected property

protected Stream inStream
return Stream

outStream protected property

protected Stream outStream
return Stream

readStream protected property

protected BoundInputStream,Agnos.Utils readStream
return Agnos.Utils.BoundInputStream

rlock protected property

protected ReentrantLock,Agnos.Utils rlock
return Agnos.Utils.ReentrantLock

wbuffer protected property

protected MemoryStream,System.IO wbuffer
return System.IO.MemoryStream

wlock protected property

protected ReentrantLock,Agnos.Utils wlock
return Agnos.Utils.ReentrantLock

wseq protected property

protected int wseq
return int