Sirikata
|
Unique identifier for streams backed by the same connection. More...
#include <Stream.hpp>
Public Types | |
enum | { MAX_HEX_SERIALIZED_LENGTH = sizeof(uint32)*2+1 } |
Public Member Functions | |
StreamID (uint32 input) | |
StreamID () | |
unsigned int | serializeToHex (uint8 *destination, unsigned int maxsize) const |
bool | unserializeFromHex (const uint8 *src, unsigned int &size) |
Static Public Member Functions | |
static uint8 | fromHex (char c) |
static char | toHex (uint8 h) |
Unique identifier for streams backed by the same connection.
Identifiers are always less than 2^30 and are reused when streams are closed.
Sirikata::Network::Stream::StreamID::StreamID | ( | uint32 | input | ) | [inline] |
Sirikata::Network::Stream::StreamID::StreamID | ( | ) | [inline] |
static uint8 Sirikata::Network::Stream::StreamID::fromHex | ( | char | c | ) | [inline, static] |
unsigned int Sirikata::Network::Stream::StreamID::serializeToHex | ( | uint8 * | destination, |
unsigned int | maxsize | ||
) | const [inline] |
References Sirikata::Network::toHex().
Referenced by Sirikata::Network::ASIOSocketWrapper::constructControlPacket(), and Sirikata::Network::TCPStream::send().
static char Sirikata::Network::Stream::StreamID::toHex | ( | uint8 | h | ) | [inline, static] |
bool Sirikata::Network::Stream::StreamID::unserializeFromHex | ( | const uint8 * | src, |
unsigned int & | size | ||
) | [inline] |