diff options
author | madmaxoft <github@xoft.cz> | 2014-01-27 21:27:13 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-27 21:27:13 +0100 |
commit | cc1284a753874aa7d351a6ea41aaec4662ca6e57 (patch) | |
tree | 1d865db64553efc61d16203e06eb93d83e636bc0 /src/OSSupport/Socket.h | |
parent | Fixed client packet parsing. (diff) | |
download | cuberite-cc1284a753874aa7d351a6ea41aaec4662ca6e57.tar cuberite-cc1284a753874aa7d351a6ea41aaec4662ca6e57.tar.gz cuberite-cc1284a753874aa7d351a6ea41aaec4662ca6e57.tar.bz2 cuberite-cc1284a753874aa7d351a6ea41aaec4662ca6e57.tar.lz cuberite-cc1284a753874aa7d351a6ea41aaec4662ca6e57.tar.xz cuberite-cc1284a753874aa7d351a6ea41aaec4662ca6e57.tar.zst cuberite-cc1284a753874aa7d351a6ea41aaec4662ca6e57.zip |
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/Socket.h | 9 |
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; |