* fhandler.h (fhandler_socket::wait_for_events): Take additional

parameter "dontwait".
	* fhandler_socket.cc (fhandler_socket::wait_for_events): Act as if the
	socket is non-blocking if dontwait is true.
	(fhandler_socket::recv_internal): Use incoming MSG_DONTWAIT flag to
	set the wait_for_events dontwait parameter.
	(fhandler_socket::send_internal): Ditto.  Optimize code slightly.
	* include/cygwin/socket.h (MSG_DONTWAIT): Define.
	* include/cygwin/version.h: Bump API minor number.
This commit is contained in:
Corinna Vinschen
2009-03-09 14:40:45 +00:00
parent c47426aedb
commit 71d13bca55
5 changed files with 30 additions and 16 deletions

View File

@ -1,6 +1,6 @@
/* cygwin/socket.h
Copyright 1999, 2000, 2001, 2005, 2006, 2007 Red Hat, Inc.
Copyright 1999, 2000, 2001, 2005, 2006, 2007, 2009 Red Hat, Inc.
This file is part of Cygwin.
@ -191,6 +191,7 @@ struct OLD_msghdr
#define MSG_PEEK 0x2 /* peek at incoming message */
#define MSG_DONTROUTE 0x4 /* send without using routing tables */
#define MSG_WAITALL 0x8 /* wait for all requested bytes */
#define MSG_DONTWAIT 0x10 /* selective non-blocking operation */
#define MSG_NOSIGNAL 0x20 /* Don't raise SIGPIPE */
#define MSG_TRUNC 0x0100 /* Normal data truncated */
#define MSG_CTRUNC 0x0200 /* Control data truncated */