Skip to content

Instantly share code, notes, and snippets.

@sknjpn
Created December 15, 2019 09:17
Show Gist options
  • Save sknjpn/6ffd44e1f4b0e1466403edab9cf4c657 to your computer and use it in GitHub Desktop.
Save sknjpn/6ffd44e1f4b0e1466403edab9cf4c657 to your computer and use it in GitHub Desktop.
while (g_client.available())
{
// 全体の長さ
uint64 size = 0;
if (g_client.lookahead<uint64>(size) && g_client.available() >= size)
{
g_client.skip(size);
Deserializer<MemoryWriter> reader;
reader.getReader().setPos(size - sizeof(uint64));
g_client.read(reader.getReader().data(), size - sizeof(uint64));
}
if (size != 0) Print << size;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment