Network buffer should now dynamically increase when needed.

This commit is contained in:
Jocke
2016-02-22 16:01:26 +01:00
parent bac23f6e8c
commit ed9149fe63
13 changed files with 206 additions and 45 deletions
+4 -1
View File
@@ -9,13 +9,16 @@ typedef unsigned int PacketID;
class NetworkClient
{
public:
NetworkClient();
virtual ~NetworkClient();
virtual void Connect(std::string playerName, std::string address, int port) = 0;
virtual void Disconnect() = 0;
virtual void Receive(Packet& packet) = 0;
virtual void Send(Packet & packet) = 0;
virtual bool IsSocketAvailable() = 0;
protected:
char m_ReadBuffer[BUFFERSIZE] = { 0 };
char* m_ReadBuffer;
unsigned int m_BufferSize = BUFFERSIZE;
};
#endif