Added missing .h and fixed the boost sleep, it works fine on linux now.

This commit is contained in:
Xawotihs@gmail.com
2013-01-28 22:26:13 +00:00
parent faff7724d6
commit 48d45f2a65
2 changed files with 3 additions and 3 deletions
+2 -1
View File
@@ -38,8 +38,9 @@ public:
JNetwork(); JNetwork();
~JNetwork(); ~JNetwork();
void Update(); void Update();
void getServerIp(string& aString);
int connect(string serverIP = ""); int connect(const string& serverIP = "");
bool isConnected(); bool isConnected();
bool isServer() { return serverIP == ""; }; bool isServer() { return serverIP == ""; };
static void ThreadProc(void* param); static void ThreadProc(void* param);
+1 -2
View File
@@ -6,7 +6,6 @@
#include "../include/DebugRoutines.h" #include "../include/DebugRoutines.h"
#include "../include/JNetwork.h" #include "../include/JNetwork.h"
#include <boost/date_time/posix_time/posix_time.hpp>
#if defined (WIN32) || defined (LINUX) #if defined (WIN32) || defined (LINUX)
#else #else
@@ -192,7 +191,7 @@ void JNetwork::ThreadProc(void* param)
#ifdef LINUX #ifdef LINUX
// erwan 2013/01 added android check because of a compilation error // erwan 2013/01 added android check because of a compilation error
#ifndef ANDROID #ifndef ANDROID
boost::this_thread::sleep(1); boost::this_thread::sleep(boost::posix_time::milliseconds(1));
#endif #endif
#elif WIN32 #elif WIN32
// boost::this_thread::sleep(boost::posix_time::microseconds(10)); // boost::this_thread::sleep(boost::posix_time::microseconds(10));