Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h> // for mkdir
|
||||
#include <sys/time.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <time.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
@@ -28,6 +32,7 @@
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <tr1/memory>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -32,14 +32,19 @@
|
||||
#ifndef SOCKET_H
|
||||
#define SOCKET_H
|
||||
|
||||
#include "../source/MCSocket.h"
|
||||
// #ifdef _WIN32
|
||||
// #include <winsock2.h>
|
||||
|
||||
// #endif
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
typedef int SOCKET;
|
||||
#define SOCKET_ERROR (-1)
|
||||
#define closesocket close
|
||||
#endif // !_WIN32
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
enum TypeSocket {BlockingSocket, NonBlockingSocket};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user