32 core::stringw m_player_name;
33 std::string m_track_name;
38 PeerVote() : m_player_name(
""), m_track_name(
""),
39 m_num_laps(1), m_reverse(
false)
44 const std::string track,
45 int laps,
bool reverse) : m_player_name(name),
uint8_t getUInt8() const
Returns an unsigned 8-bit integer.
Definition: network_string.hpp:346
int decodeString(std::string *out) const
Returns a string at the given position.
Definition: network_string.cpp:104
BareNetworkString & addUInt8(const uint8_t value)
Add 8 bit unsigned int.
Definition: network_string.hpp:210
BareNetworkString & encodeString(const std::string &value)
Adds one byte for the length of the string, and then (up to 255 of) the characters of the given strin...
Definition: network_string.cpp:79
int decodeStringW(irr::core::stringw *out) const
Returns an irrlicht wide string from the utf8 encoded string at the given position.
Definition: network_string.cpp:120
A new implementation of NetworkString, which has a fixed format: Byte 0: The type of the message,...
Definition: network_string.hpp:422
A simple structure to store a vote from a client: track name, number of laps and reverse or not.
Definition: peer_vote.hpp:30
PeerVote(NetworkString &ns)
Initialised this object from a data in a network string.
Definition: peer_vote.hpp:54
void encode(NetworkString *ns)
Encodes this vote object into a network string.
Definition: peer_vote.hpp:65
Defines functions to easily manipulate 8-bit network destinated strings.