1
0

Rewritten networking to use non-blocking sockets.

This fixes #592.
This commit is contained in:
madmaxoft
2014-01-27 21:27:13 +01:00
parent 30c431b479
commit cc1284a753
4 changed files with 177 additions and 63 deletions

View File

@@ -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;