#include <netinet/in.h>
#include <netdb.h>
+#include <sys/select.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/types.h>
while(!network.networkTerminated)
{
int ns = network.ns;
-
+
if(ns)
{
struct timeval tv = { 0, 0 }; // TESTING 0 INSTEAD OF (int)(1000000 / 18.2) };
network.mutex.Release();
network.selectSemaphore.Wait();
network.mutex.Wait();
- }
+ }
else
{
ecere::sys::Sleep(1 / 18.2f);
network.socketsSemaphore.Wait();
network.mutex.Wait();
}
-
+
}
network.mutex.Release();
return 0;