summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/Socket.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-28 06:43:59 +0100
committerMattes D <github@xoft.cz>2014-01-28 06:43:59 +0100
commit5f9228bac81a5105c661b4ec74b94f2148cf7569 (patch)
tree72b55481af9c4116da779e3d9738a5b26df94dc5 /src/OSSupport/Socket.h
parentUpdated polarssl (diff)
parentSquashed common code. (diff)
downloadcuberite-5f9228bac81a5105c661b4ec74b94f2148cf7569.tar
cuberite-5f9228bac81a5105c661b4ec74b94f2148cf7569.tar.gz
cuberite-5f9228bac81a5105c661b4ec74b94f2148cf7569.tar.bz2
cuberite-5f9228bac81a5105c661b4ec74b94f2148cf7569.tar.lz
cuberite-5f9228bac81a5105c661b4ec74b94f2148cf7569.tar.xz
cuberite-5f9228bac81a5105c661b4ec74b94f2148cf7569.tar.zst
cuberite-5f9228bac81a5105c661b4ec74b94f2148cf7569.zip
Diffstat (limited to 'src/OSSupport/Socket.h')
-rw-r--r--src/OSSupport/Socket.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/OSSupport/Socket.h b/src/OSSupport/Socket.h
index 4ca3d61f4..bdc2babf5 100644
--- a/src/OSSupport/Socket.h
+++ b/src/OSSupport/Socket.h
@@ -24,6 +24,12 @@ public:
{
IPv4 = AF_INET,
IPv6 = AF_INET6,
+
+ #ifdef _WIN32
+ ErrWouldBlock = WSAEWOULDBLOCK,
+ #else
+ ErrWouldBlock = EWOULDBLOCK,
+ #endif
} ;
#ifdef _WIN32
@@ -110,6 +116,9 @@ public:
unsigned short GetPort(void) const; // Returns 0 on failure
const AString & GetIPString(void) const { return m_IPString; }
+
+ /** Sets the socket into non-blocking mode */
+ void SetNonBlocking(void);
private:
xSocket m_Socket;