summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy/Server.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-11 17:39:43 +0100
committerGitHub <noreply@github.com>2021-01-11 17:39:43 +0100
commiteeb63b8901a9c049f1bb594abb9ce9b4a9c47620 (patch)
treeb07daae788f918b83eeb0bdbd51e49292f1c8d88 /Tools/ProtoProxy/Server.h
parentFixed switch-ups regarding some slab and stair recipes (#5099) (diff)
downloadcuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.gz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.bz2
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.lz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.xz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.zst
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.zip
Diffstat (limited to '')
-rw-r--r--Tools/ProtoProxy/Server.h16
1 files changed, 14 insertions, 2 deletions
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; }
} ;