Sirikata
|
RecordSSTStream wraps a regular SST stream, turning it into a record-based stream, i.e. More...
#include <RecordSSTStream.hpp>
Public Types | |
typedef std::tr1::function < void(MemoryReference)> | RecordCallback |
Public Member Functions | |
RecordSSTStream () | |
~RecordSSTStream () | |
void | initialize (StreamPtrType stream, RecordCallback cb) |
void | write (const MemoryReference &data) |
void | destroy () |
Private Member Functions | |
RecordSSTStream (const RecordSSTStream &) | |
void | handleRead (uint8 *data, int size) |
void | writeSomeData (Liveness::Token alive) |
Private Attributes | |
StreamPtrType | mStream |
RecordCallback | mCB |
std::queue< std::string > | outstanding |
bool | writing |
String | partial_frame |
RecordSSTStream wraps a regular SST stream, turning it into a record-based stream, i.e.
performing buffering and triggering callbacks for each record rather than for each set of received bytes. This is useful for reliable, message-oriented protocols. The user submits individual records to be sent and it uses simple framing to identify the records at the receiver.
typedef std::tr1::function<void(MemoryReference)> Sirikata::RecordSSTStream< StreamPtrType >::RecordCallback |
Sirikata::RecordSSTStream< StreamPtrType >::RecordSSTStream | ( | ) | [inline] |
Sirikata::RecordSSTStream< StreamPtrType >::~RecordSSTStream | ( | ) | [inline] |
Sirikata::RecordSSTStream< StreamPtrType >::RecordSSTStream | ( | const RecordSSTStream< StreamPtrType > & | ) | [private] |
void Sirikata::RecordSSTStream< StreamPtrType >::destroy | ( | ) | [inline] |
void Sirikata::RecordSSTStream< StreamPtrType >::handleRead | ( | uint8 * | data, |
int | size | ||
) | [inline, private] |
void Sirikata::RecordSSTStream< StreamPtrType >::initialize | ( | StreamPtrType | stream, |
RecordCallback | cb | ||
) | [inline] |
Referenced by Sirikata::EnvironmentSimulation::handleCreatedStream().
void Sirikata::RecordSSTStream< StreamPtrType >::write | ( | const MemoryReference & | data | ) | [inline] |
Referenced by Sirikata::EnvironmentSimulation::sendUpdate().
void Sirikata::RecordSSTStream< StreamPtrType >::writeSomeData | ( | Liveness::Token | alive | ) | [inline, private] |
RecordCallback Sirikata::RecordSSTStream< StreamPtrType >::mCB [private] |
StreamPtrType Sirikata::RecordSSTStream< StreamPtrType >::mStream [private] |
std::queue<std::string> Sirikata::RecordSSTStream< StreamPtrType >::outstanding [private] |
String Sirikata::RecordSSTStream< StreamPtrType >::partial_frame [private] |
bool Sirikata::RecordSSTStream< StreamPtrType >::writing [private] |