summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/Socket.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-02-01 00:31:05 +0100
committerTycho <work.tycho+git@gmail.com>2014-02-01 00:31:05 +0100
commitfec17409d2f566af18bad269fe2c5c372a474ecb (patch)
tree93baa2311e38fddb86a68e550955c261ac96cf3b /src/OSSupport/Socket.h
parentChanged signitures of Several BLockHandler Methods (diff)
parentContributors now match real life, and are alpha-sorted. (diff)
downloadcuberite-fec17409d2f566af18bad269fe2c5c372a474ecb.tar
cuberite-fec17409d2f566af18bad269fe2c5c372a474ecb.tar.gz
cuberite-fec17409d2f566af18bad269fe2c5c372a474ecb.tar.bz2
cuberite-fec17409d2f566af18bad269fe2c5c372a474ecb.tar.lz
cuberite-fec17409d2f566af18bad269fe2c5c372a474ecb.tar.xz
cuberite-fec17409d2f566af18bad269fe2c5c372a474ecb.tar.zst
cuberite-fec17409d2f566af18bad269fe2c5c372a474ecb.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;