From eeb63b8901a9c049f1bb594abb9ce9b4a9c47620 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 11 Jan 2021 16:39:43 +0000 Subject: zlib -> libdeflate (#5085) + Use libdeflate + Use std::byte * Fix passing temporary to string_view + Emulate make_unique_for_overwrite --- src/Protocol/ForgeHandshake.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Protocol/ForgeHandshake.h') diff --git a/src/Protocol/ForgeHandshake.h b/src/Protocol/ForgeHandshake.h index 46e0efaa6..061369c15 100644 --- a/src/Protocol/ForgeHandshake.h +++ b/src/Protocol/ForgeHandshake.h @@ -34,7 +34,7 @@ public: void SendServerHello(); /** Process received data from the client advancing the Forge handshake. */ - void DataReceived(cClientHandle * a_Client, const char * a_Data, size_t a_Size); + void DataReceived(cClientHandle * a_Client, ContiguousByteBufferView a_Data); private: /** True if the Forge handshake is in an errored state. */ @@ -48,13 +48,13 @@ private: cUUID m_UUID; Json::Value m_Properties; - void HandleClientHello(cClientHandle * a_Client, const char * a_Data, size_t a_Size); - void HandleModList(cClientHandle * a_Client, const char * a_Data, size_t a_Size); - void HandleHandshakeAck(cClientHandle * a_Client, const char * a_Data, size_t a_Size); + void HandleClientHello(cClientHandle * a_Client, ContiguousByteBufferView a_Data); + void HandleModList(cClientHandle * a_Client, ContiguousByteBufferView a_Data); + void HandleHandshakeAck(cClientHandle * a_Client, ContiguousByteBufferView a_Data); /** Set errored state to prevent further handshake message processing. */ void SetError(const AString & message); /** Parse the client ModList packet of installed Forge mods and versions. */ - AStringMap ParseModList(const char * a_Data, size_t a_Size); + AStringMap ParseModList(ContiguousByteBufferView a_Data); }; -- cgit v1.2.3