Packet wraps data to send / to receive through the network.
More...
#include <SFML/Network/Packet.hpp>
Packet wraps data to send / to receive through the network.
Definition at line 41 of file Packet.hpp.
◆ Packet()
◆ ~Packet()
| virtual sf::Packet::~Packet |
( |
| ) |
|
|
virtual |
◆ Append()
| void sf::Packet::Append |
( |
const void * | Data, |
|
|
std::size_t | SizeInBytes ) |
Append data to the end of the packet.
- Parameters
-
| Data | : Pointer to the bytes to append |
| SizeInBytes | : Number of bytes to append |
◆ Clear()
| void sf::Packet::Clear |
( |
| ) |
|
◆ EndOfPacket()
| bool sf::Packet::EndOfPacket |
( |
| ) |
const |
Tell if the reading position has reached the end of the packet.
- Returns
- True if all data have been read into the packet
◆ GetData()
| const char * sf::Packet::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.
- Returns
- Pointer to the data
◆ GetDataSize()
| std::size_t sf::Packet::GetDataSize |
( |
| ) |
const |
Get the size of the data contained in the packet.
- Returns
- Data size, in bytes
◆ operator bool()
| sf::Packet::operator bool |
( |
| ) |
const |
Return the validity of packet.
- Returns
- True if last data extraction from packet was successful
◆ operator<<() [1/13]
| Packet & sf::Packet::operator<< |
( |
bool | Data | ) |
|
Operator << overloads to put data into the packet.
◆ operator<<() [2/13]
| Packet & sf::Packet::operator<< |
( |
const char * | Data | ) |
|
◆ operator<<() [3/13]
| Packet & sf::Packet::operator<< |
( |
const std::string & | Data | ) |
|
◆ operator<<() [4/13]
| Packet & sf::Packet::operator<< |
( |
const std::wstring & | Data | ) |
|
◆ operator<<() [5/13]
| Packet & sf::Packet::operator<< |
( |
const wchar_t * | Data | ) |
|
◆ operator<<() [6/13]
| Packet & sf::Packet::operator<< |
( |
double | Data | ) |
|
◆ operator<<() [7/13]
| Packet & sf::Packet::operator<< |
( |
float | Data | ) |
|
◆ operator<<() [8/13]
| Packet & sf::Packet::operator<< |
( |
Int16 | Data | ) |
|
◆ operator<<() [9/13]
| Packet & sf::Packet::operator<< |
( |
Int32 | Data | ) |
|
◆ operator<<() [10/13]
| Packet & sf::Packet::operator<< |
( |
Int8 | Data | ) |
|
◆ operator<<() [11/13]
| Packet & sf::Packet::operator<< |
( |
Uint16 | Data | ) |
|
◆ operator<<() [12/13]
| Packet & sf::Packet::operator<< |
( |
Uint32 | Data | ) |
|
◆ operator<<() [13/13]
| Packet & sf::Packet::operator<< |
( |
Uint8 | Data | ) |
|
◆ operator>>() [1/13]
| Packet & sf::Packet::operator>> |
( |
bool & | Data | ) |
|
Operator >> overloads to extract data from the packet.
◆ operator>>() [2/13]
| Packet & sf::Packet::operator>> |
( |
char * | Data | ) |
|
◆ operator>>() [3/13]
| Packet & sf::Packet::operator>> |
( |
double & | Data | ) |
|
◆ operator>>() [4/13]
| Packet & sf::Packet::operator>> |
( |
float & | Data | ) |
|
◆ operator>>() [5/13]
| Packet & sf::Packet::operator>> |
( |
Int16 & | Data | ) |
|
◆ operator>>() [6/13]
| Packet & sf::Packet::operator>> |
( |
Int32 & | Data | ) |
|
◆ operator>>() [7/13]
| Packet & sf::Packet::operator>> |
( |
Int8 & | Data | ) |
|
◆ operator>>() [8/13]
| Packet & sf::Packet::operator>> |
( |
std::string & | Data | ) |
|
◆ operator>>() [9/13]
| Packet & sf::Packet::operator>> |
( |
std::wstring & | Data | ) |
|
◆ operator>>() [10/13]
| Packet & sf::Packet::operator>> |
( |
Uint16 & | Data | ) |
|
◆ operator>>() [11/13]
| Packet & sf::Packet::operator>> |
( |
Uint32 & | Data | ) |
|
◆ operator>>() [12/13]
| Packet & sf::Packet::operator>> |
( |
Uint8 & | Data | ) |
|
◆ operator>>() [13/13]
| Packet & sf::Packet::operator>> |
( |
wchar_t * | Data | ) |
|
◆ SocketTCP
◆ SocketUDP
The documentation for this class was generated from the following file: