Phants Client for Redis™*
|
Public Member Functions | |
void | BulkStringBegin (int size) |
void | BulkStringData (byte[] data, int offset, int numBytes) |
void | BulkStringDone () |
This interface defines methods that are called when a RESP Bulk String is being parsed.
void BulkStringBegin | ( | int | size | ) |
Called at the start of a RESP Bulk String.
size | The 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.
data | A buffer containing the block of new bytes. |
offset | The zero-based offset into data where the new bytes are stored. |
numBytes | The 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.