mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Clean up and compress some pre-join packets (#15881)
This commit is contained in:
parent
287880aa27
commit
afb15978d9
12 changed files with 260 additions and 102 deletions
|
@ -51,6 +51,16 @@ public:
|
|||
putRawString(src.data(), src.size());
|
||||
}
|
||||
|
||||
// Reads bytes from packet into string buffer
|
||||
void readRawString(char *dst, u32 len);
|
||||
std::string readRawString(u32 len)
|
||||
{
|
||||
std::string s;
|
||||
s.resize(len);
|
||||
readRawString(&s[0], len);
|
||||
return s;
|
||||
}
|
||||
|
||||
NetworkPacket &operator>>(std::string &dst);
|
||||
NetworkPacket &operator<<(std::string_view src);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue