Removed VoidCode enum, added missing tcp client windos code and missing if macro in TcpClient.hpp

This commit is contained in:
xX-TheDoctor-Xx
2016-07-20 22:20:50 +01:00
parent c5d565698e
commit 3f99e8a178
10 changed files with 33 additions and 33 deletions

View File

@ -10,9 +10,8 @@
#ifdef _MSC_VER
#pragma once
#endif
#undef SendMessage
#endif
class TcpClient
{
@ -27,7 +26,7 @@ public:
uint16 GetPort();
void SetPort(uint16 port);
VoidCode Connect();
bool Connect();
void ReceiveMessages();
void SendMessage(const NetworkMessage &message);
@ -40,7 +39,7 @@ private:
const NetworkBuffer &ReceiveDataArray();
static void ReceiveData(TcpClient *client);
static void SendNetworkMessage(const NetworkMessage &message, TcpClient *client);
VoidCode Initialize(const std::string &ip, uint16 port = default_port);
bool Initialize(const std::string &ip, uint16 port = default_port);
std::string ip;
uint16 port = 0;
@ -55,10 +54,12 @@ private:
#endif
};
#ifdef _MSC_VER
#ifdef UNICODE
#define SendMessage SendMessageW
#else
#define SendMessage SendMessageA
#endif // !UNICODE
#endif
#endif