Added DataAvailable method in TcpClient which will return the number of bytes available in the stream

Config functions are now inline
NetworkMessage and NetworkBuffer are being reworked
This commit is contained in:
xX-TheDoctor-Xx
2016-07-23 13:15:59 +01:00
parent c83b4101d0
commit 9e5cd40847
11 changed files with 41 additions and 16 deletions

View File

@ -12,7 +12,7 @@ struct NetworkBuffer
NetworkBuffer();
~NetworkBuffer();
uint32 body_size;
byte *header = nullptr;
byte *body = nullptr;
};

View File

@ -34,7 +34,12 @@ public:
bool Connect();
bool DataAvailable(uint16 &size);
//this method will receive the messages automaticaly and use the callback methods
void ReceiveMessages();
//this is a more manual method with no callbacks
const NetworkMessage &ReceiveMessage();
void SendMessage(const NetworkMessage &message);