#include <Packet.hpp>
Public Member Functions | |
sfPacket () | |
Default constructor. | |
virtual | ~sfPacket () |
Virtual destructor. | |
void | Append (const void *Data, std::size_t SizeInBytes) |
Append data to the end of the packet. | |
void | Clear () |
Clear the packet data. | |
const char * | GetData () const |
Get a pointer to the data contained in the packet Warning : the returned pointer may be invalid after you append data to the packet. | |
sfUint32 | GetDataSize () const |
Get the size of the data contained in the packet. | |
sfPacket & | operator>> (sfInt8 &Data) |
Operator >> overloads to extract data from the packet. | |
sfPacket & | operator>> (sfUint8 &Data) |
sfPacket & | operator>> (sfInt16 &Data) |
sfPacket & | operator>> (sfUint16 &Data) |
sfPacket & | operator>> (sfInt32 &Data) |
sfPacket & | operator>> (sfUint32 &Data) |
sfPacket & | operator>> (float &Data) |
sfPacket & | operator>> (double &Data) |
sfPacket & | operator>> (char *Data) |
sfPacket & | operator>> (std::string &Data) |
sfPacket & | operator<< (sfInt8 Data) |
Operator << overloads to put data into the packet. | |
sfPacket & | operator<< (sfUint8 Data) |
sfPacket & | operator<< (sfInt16 Data) |
sfPacket & | operator<< (sfUint16 Data) |
sfPacket & | operator<< (sfInt32 Data) |
sfPacket & | operator<< (sfUint32 Data) |
sfPacket & | operator<< (float Data) |
sfPacket & | operator<< (double Data) |
sfPacket & | operator<< (const char *Data) |
sfPacket & | operator<< (const std::string &Data) |
Friends | |
class | sfSocketTCP |
class | sfSocketUDP |
Definition at line 39 of file Packet.hpp.
sfPacket::sfPacket | ( | ) |
sfPacket::~sfPacket | ( | ) | [virtual] |
void sfPacket::Append | ( | const void * | Data, | |
std::size_t | SizeInBytes | |||
) |
Append data to the end of the packet.
Data | : Pointer to the bytes to append | |
SizeInBytes | : Number of bytes to append |
Definition at line 54 of file Packet.cpp.
void sfPacket::Clear | ( | ) |
const char * sfPacket::GetData | ( | ) | const |
Get a pointer to the data contained in the packet Warning : the returned pointer may be invalid after you append data to the packet.
Definition at line 76 of file Packet.cpp.
sfUint32 sfPacket::GetDataSize | ( | ) | const |
Get the size of the data contained in the packet.
Definition at line 85 of file Packet.cpp.
sfPacket & sfPacket::operator>> | ( | sfInt8 & | Data | ) |
sfPacket & sfPacket::operator<< | ( | sfInt8 | Data | ) |