net: add SetSocketNonBlocking() as OS independent wrapper

This commit is contained in:
Philip Kaufmann
2014-07-09 11:00:00 +02:00
parent e8d4cb8071
commit eaedb59e05
3 changed files with 47 additions and 44 deletions

View File

@@ -180,5 +180,7 @@ bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest
std::string NetworkErrorString(int err);
/** Close socket and set hSocket to INVALID_SOCKET */
bool CloseSocket(SOCKET& hSocket);
/** Disable or enable blocking-mode for a socket */
bool SetSocketNonBlocking(SOCKET& hSocket, bool fNonBlocking);
#endif