Added Development information for me to dont forget things xD

Added AllAndMe DistributionType
Added a ThreadPool class
Added VoidNetClientAPI
This commit is contained in:
xX-TheDoctor-Xx
2016-07-18 01:13:20 +01:00
parent 72aa8ee0c4
commit a211400964
23 changed files with 323 additions and 32 deletions

View File

@ -3,6 +3,7 @@
#include "Defs.hpp"
#include "NetworkMessage.hpp"
#include "ThreadPool.hpp"
#include <string>
@ -10,6 +11,8 @@
#pragma once
#endif
#undef SendMessage
class TcpClient
{
public:
@ -27,21 +30,30 @@ public:
NetworkBuffer ReceiveDataArray();
const NetworkMessage &ReceiveData();
bool SendData(const NetworkMessage &message);
VoidCode SendMessage(const NetworkMessage &message);
private:
static VoidCode SendNetworkMessage(const NetworkMessage &message, TcpClient *client);
VoidCode Initialize(const std::string &ip, uint16 port = default_port);
std::string ip;
uint16 port = 0;
bool initialized;
ThreadPool thread_pool;
#ifdef _MSC_VER
SOCKET socket = INVALID_SOCKET;
SOCKET tcp_socket = INVALID_SOCKET;
struct addrinfo *result = nullptr;
struct addrinfo *ptr = nullptr;
struct addrinfo hints;
#endif
};
#ifdef UNICODE
#define SendMessage SendMessageW
#else
#define SendMessage SendMessageA
#endif // !UNICODE
#endif