C# Class CqlSharp.Protocol.FrameReader

Reader to read values from a socket. Heavily optimized to reduce task creation and byte array allocation
Inheritance: IDisposable
显示文件 Open project: reuzel/CqlSharp Class Usage Examples

Public Methods

Method Description
BufferRemainingData ( ) : System.Threading.Tasks.Task
DecompressAsync ( ) : System.Threading.Tasks.Task

Decompresses the frame contents async.

Dispose ( ) : void
FrameReader ( Stream innerStream, int length ) : System
ReadByteAsync ( ) : Task

Reads the byte async.

ReadBytesAsync ( ) : Task

Reads the bytes async.

ReadInetAsync ( ) : Task

Reads the inet async.

ReadIntAsync ( ) : Task

Reads the int async.

ReadShortAsync ( ) : Task

Reads the short async.

ReadShortBytesAsync ( ) : Task

Reads the short bytes async.

ReadStringAsync ( ) : Task
ReadStringListAsync ( ) : Task>

Reads the string list async.

ReadStringMultimapAsync ( ) : IList>>.Task

Reads the string multimap async.

ReadUuidAsync ( ) : Task

Reads the UUID async.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Private Methods

Method Description
CopySegmentToArray ( ) : byte[]

Copies the segment to a new array.

ReadAsync ( byte buffer, int offset, int count ) : Task
ReadByteInternalAsync ( ) : Task

Reads the byte async, awaiting network operations

ReadIntInternalAsync ( ) : Task

Reads the int async, awaiting network operations

ReadSegmentAsync ( int size ) : System.Threading.Tasks.Task

Reads the array segment async.

ReadShortInternalAsync ( ) : Task

Reads the short async, awaiting network operations

ReadStringAsync ( Task lengthTask ) : Task

Reads the string async.

TryGetSegmentFromBuffer ( int size ) : bool

Tries to get a array segment of specific size from the buffer.

Method Details

BufferRemainingData() public method

public BufferRemainingData ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

DecompressAsync() public method

Decompresses the frame contents async.
public DecompressAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool /// true to release both managed and unmanaged resources; false to release only /// unmanaged resources. ///
return void

FrameReader() public method

public FrameReader ( Stream innerStream, int length ) : System
innerStream Stream
length int
return System

ReadByteAsync() public method

Reads the byte async.
public ReadByteAsync ( ) : Task
return Task

ReadBytesAsync() public method

Reads the bytes async.
public ReadBytesAsync ( ) : Task
return Task

ReadInetAsync() public method

Reads the inet async.
public ReadInetAsync ( ) : Task
return Task

ReadIntAsync() public method

Reads the int async.
public ReadIntAsync ( ) : Task
return Task

ReadShortAsync() public method

Reads the short async.
public ReadShortAsync ( ) : Task
return Task

ReadShortBytesAsync() public method

Reads the short bytes async.
public ReadShortBytesAsync ( ) : Task
return Task

ReadStringAsync() public method

public ReadStringAsync ( ) : Task
return Task

ReadStringListAsync() public method

Reads the string list async.
public ReadStringListAsync ( ) : Task>
return Task>

ReadStringMultimapAsync() public method

Reads the string multimap async.
public ReadStringMultimapAsync ( ) : IList>>.Task
return IList>>.Task

ReadUuidAsync() public method

Reads the UUID async.
public ReadUuidAsync ( ) : Task
return Task