From 18cfcff264cf53519696f4f176869194dd76fccb Mon Sep 17 00:00:00 2001 From: mdiluzio Date: Sat, 3 Jan 2015 18:55:44 +0000 Subject: [PATCH] Improve both client and server code to account for END of messages, allowing for incomplete packets with TCP --- source/client/client.cpp | 20 +++++++++++++------- source/client/net.cpp | 24 ++++++++++++++++-------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/source/client/client.cpp b/source/client/client.cpp index a5fe5ba..d781ce3 100644 --- a/source/client/client.cpp +++ b/source/client/client.cpp @@ -101,17 +101,23 @@ int runClient(int argc, char* argv[]) while ( n >= 0 ) { - memset(buffer,0,sizeof(buffer)); - std::cout<<"Waiting for gamestate"<