summaryrefslogtreecommitdiffstats
path: root/source/MCSocket.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-13 22:47:03 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-13 22:47:03 +0100
commit4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c (patch)
treefebea3ecd89c0d4aa83924e430bf11366d754733 /source/MCSocket.h
parentNew makefile with automatic *.cpp sourcefile import, automatic header file dependencies and switchable debug / release configuration. gnumake-specific :( (diff)
downloadcuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.gz
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.bz2
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.lz
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.xz
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.zst
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.zip
Diffstat (limited to '')
-rw-r--r--source/MCSocket.h35
1 files changed, 0 insertions, 35 deletions
diff --git a/source/MCSocket.h b/source/MCSocket.h
deleted file mode 100644
index 30aa20bdd..000000000
--- a/source/MCSocket.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#pragma once
-
-#ifndef _WIN32
- // Linux threads http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
- #include <netdb.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <unistd.h>
-
- // TODO: We shouldn't need these! Use the OS support objects instead
- #define SOCKET int
- typedef void *HANDLE;
- #define CRITICAL_SECTION pthread_mutex_t
- #define SD_BOTH (2)
- #define closesocket(x) (shutdown(x, SD_BOTH), close(x))
- #define SOCKET_ERROR SO_ERROR
- #define EnterCriticalSection(x) pthread_mutex_lock(x)
- #define LeaveCriticalSection(x) pthread_mutex_unlock(x)
- #define InitializeCriticalSection(x) pthread_mutex_init(x, NULL)
- #define DeleteCriticalSection(x) (x)
-#endif
-
-
-
-
-
-inline bool IsSocketError( int a_ReturnedValue )
-{
- #ifdef _WIN32
- return (a_ReturnedValue == SOCKET_ERROR || a_ReturnedValue == 0);
- #else
- return (a_ReturnedValue <= 0);
- #endif
-}