- sfPacket_append
void sfPacket_append(sfPacket* packet, void* data, size_t sizeInBytes)
Append data to the end of a packet
- sfPacket_canRead
bool sfPacket_canRead(sfPacket* packet)
Test the validity of a packet, for reading
- sfPacket_clear
void sfPacket_clear(sfPacket* packet)
- sfPacket_copy
sfPacket* sfPacket_copy(sfPacket* packet)
Create a new packet by copying an existing one
- sfPacket_create
sfPacket* sfPacket_create()
- sfPacket_destroy
void sfPacket_destroy(sfPacket* packet)
- sfPacket_endOfPacket
bool sfPacket_endOfPacket(sfPacket* packet)
Tell if the reading position has reached the end of a packet
- sfPacket_getData
const(void)* sfPacket_getData(sfPacket* packet)
Get a pointer to the data contained in a packet
- sfPacket_getDataSize
size_t sfPacket_getDataSize(sfPacket* packet)
Get the size of the data contained in a packet
- sfPacket_readBool
bool sfPacket_readBool(sfPacket* packet)
Functions to extract data from a packet
- sfPacket_readDouble
double sfPacket_readDouble(sfPacket* packet)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_readFloat
float sfPacket_readFloat(sfPacket* packet)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_readInt16
short sfPacket_readInt16(sfPacket* packet)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_readInt32
int sfPacket_readInt32(sfPacket* packet)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_readInt8
byte sfPacket_readInt8(sfPacket* packet)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_readUint16
ushort sfPacket_readUint16(sfPacket* packet)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_readUint32
uint sfPacket_readUint32(sfPacket* packet)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_readUint8
ubyte sfPacket_readUint8(sfPacket* packet)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_writeBool
void sfPacket_writeBool(sfPacket* packet, bool )
Functions to insert data into a packet
- sfPacket_writeDouble
void sfPacket_writeDouble(sfPacket* packet, double )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_writeFloat
void sfPacket_writeFloat(sfPacket* packet, float )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_writeInt16
void sfPacket_writeInt16(sfPacket* packet, short )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_writeInt32
void sfPacket_writeInt32(sfPacket* packet, int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_writeInt8
void sfPacket_writeInt8(sfPacket* packet, byte )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_writeUint16
void sfPacket_writeUint16(sfPacket* packet, ushort )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_writeUint32
void sfPacket_writeUint32(sfPacket* packet, uint )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- sfPacket_writeUint8
void sfPacket_writeUint8(sfPacket* packet, ubyte )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
Packets provide a safe and easy way to serialize data, in order to send it over the network using sockets (sf::TcpSocket, sf::UdpSocket).
Packets solve 2 fundamental problems that arise when transferring data over the network:
$(PARA The $(U Packet) class provides both input and output modes.)