From 657c7d68d3fde9ff7042149d51f55ca36e5c8385 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 5 Mar 2007 21:36:42 +0000 Subject: Adding (bad) support for non-blocking mode under win32. --- lib/Handle.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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 #include @@ -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 } -- cgit v1.2.3