Phants Client for Redis™*
Public Member Functions | List of all members
BulkStringParser Interface Reference
Inheritance diagram for BulkStringParser:
Inheritance graph
[legend]

Public Member Functions

void BulkStringBegin (int size)
 
void BulkStringData (byte[] data, int offset, int numBytes)
 
void BulkStringDone ()
 

Detailed Description

This interface defines methods that are called when a RESP Bulk String is being parsed.

Member Function Documentation

void BulkStringBegin ( int  size)

Called at the start of a RESP Bulk String.

Parameters
sizeThe length of the string being parsed.

Implemented in MessageParser, BulkStringArraySinkAdapter, IntegerArraySinkAdapter, and BulkStringSinkAdapter.

void BulkStringData ( byte[]  data,
int  offset,
int  numBytes 
)

Called when a block of string data has been read.

Since RESP Bulk Strings can be up to 512MB in length, this interface was designed to handle data in chunks (typically sent over a network). This method will be called as many times is as necessary to transfer the whole Bulk String.

Parameters
dataA buffer containing the block of new bytes.
offsetThe zero-based offset into data where the new bytes are stored.
numBytesThe number of bytes read.

Implemented in MessageParser, BulkStringArraySinkAdapter, IntegerArraySinkAdapter, and BulkStringSinkAdapter.

void BulkStringDone ( )

Called after the last byte(s) of a Bulk String have been parsed.

Implemented in MessageParser, BulkStringArraySinkAdapter, IntegerArraySinkAdapter, and BulkStringSinkAdapter.


The documentation for this interface was generated from the following file: