diff options
Diffstat (limited to 'Tools/ProtoProxy/Connection.h')
-rw-r--r-- | Tools/ProtoProxy/Connection.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Tools/ProtoProxy/Connection.h b/Tools/ProtoProxy/Connection.h index 6c13efba2..b524561a1 100644 --- a/Tools/ProtoProxy/Connection.h +++ b/Tools/ProtoProxy/Connection.h @@ -13,6 +13,10 @@ #include "mbedTLS++/AesCfb128Decryptor.h" #include "mbedTLS++/AesCfb128Encryptor.h" +#ifndef _WIN32 + typedef int SOCKET; +#endif + @@ -85,7 +89,7 @@ protected: cAesCfb128Decryptor m_ServerDecryptor; cAesCfb128Encryptor m_ServerEncryptor; - AString m_ServerEncryptionBuffer; // Buffer for the data to be sent to the server once encryption is established + ContiguousByteBuffer m_ServerEncryptionBuffer; // Buffer for the data to be sent to the server once encryption is established /** Set to true when PACKET_PING is received from the client; will cause special parsing for server kick */ bool m_HasClientPinged; @@ -119,13 +123,13 @@ protected: double GetRelativeTime(void); /** Sends data to the specified socket. If sending fails, prints a fail message using a_Peer and returns false. */ - bool SendData(SOCKET a_Socket, const char * a_Data, size_t a_Size, const char * a_Peer); + bool SendData(SOCKET a_Socket, ContiguousByteBufferView a_Data, const char * a_Peer); /** Sends data to the specified socket. If sending fails, prints a fail message using a_Peer and returns false. */ bool SendData(SOCKET a_Socket, cByteBuffer & a_Data, const char * a_Peer); /** Sends data to the specfied socket, after encrypting it using a_Encryptor. If sending fails, prints a fail message using a_Peer and returns false */ - bool SendEncryptedData(SOCKET a_Socket, cAesCfb128Encryptor & a_Encryptor, const char * a_Data, size_t a_Size, const char * a_Peer); + bool SendEncryptedData(SOCKET a_Socket, cAesCfb128Encryptor & a_Encryptor, ContiguousByteBufferView a_Data, const char * a_Peer); /** Sends data to the specfied socket, after encrypting it using a_Encryptor. If sending fails, prints a fail message using a_Peer and returns false */ bool SendEncryptedData(SOCKET a_Socket, cAesCfb128Encryptor & a_Encryptor, cByteBuffer & a_Data, const char * a_Peer); |