diff options
author | pixel <pixel> | 2007-03-05 21:36:42 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-03-05 21:36:42 +0000 |
commit | 657c7d68d3fde9ff7042149d51f55ca36e5c8385 (patch) | |
tree | f459490edef2a39db43844909f31cc6272bcf300 | |
parent | 5842cd5305a3431bdd3129d7112efc3bfbc03f3e (diff) |
Adding (bad) support for non-blocking mode under win32.
-rw-r--r-- | lib/Handle.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Handle.cc b/lib/Handle.cc index ceb10f6..265bd55 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Handle.cc,v 1.78 2006-11-14 10:10:10 pixel Exp $ */ +/* $Id: Handle.cc,v 1.79 2007-03-05 21:36:42 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -203,6 +203,11 @@ void Handle::SetNonBlock(void) { fcntl(h, F_SETFL, O_NONBLOCK); } nonblock = true; +#elif defined _WIN32 + // HACKY HACKY HACK!! + // Let's think windows will behave correctly on a non-socket here... + u_long iMode = 1; + ioctlsocket(h, FIONBIO, &iMode); #endif } |