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 --- Tools/ProtoProxy/Server.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Tools/ProtoProxy/Server.h') diff --git a/Tools/ProtoProxy/Server.h b/Tools/ProtoProxy/Server.h index c09a72b85..e8db7f1c7 100644 --- a/Tools/ProtoProxy/Server.h +++ b/Tools/ProtoProxy/Server.h @@ -9,8 +9,20 @@ #pragma once +#include "Globals.h" #include "mbedTLS++/RsaPrivateKey.h" +#ifdef _WIN32 + #define SocketError WSAGetLastError() +#else + typedef int SOCKET; + enum + { + INVALID_SOCKET = -1, + }; + #define closesocket close + #define SocketError errno +#endif @@ -20,7 +32,7 @@ class cServer { SOCKET m_ListenSocket; cRsaPrivateKey m_PrivateKey; - AString m_PublicKeyDER; + ContiguousByteBuffer m_PublicKeyDER; UInt16 m_ConnectPort; public: @@ -30,7 +42,7 @@ public: void Run(void); cRsaPrivateKey & GetPrivateKey(void) { return m_PrivateKey; } - const AString & GetPublicKeyDER (void) { return m_PublicKeyDER; } + ContiguousByteBufferView GetPublicKeyDER (void) { return m_PublicKeyDER; } UInt16 GetConnectPort(void) const { return m_ConnectPort; } } ; -- cgit v1.2.3