diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-04-03 19:07:59 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-04-03 19:07:59 +0000 |
commit | 321ddf2422d3fafe29c68c2945bcc9063a238d83 (patch) | |
tree | 681d8a28259016add4845c0591015af47efbed71 /winsup/cygwin/wsock_event.h | |
parent | 81961a50011210c0ee22a3a5efe2ebda721b3c52 (diff) | |
download | cygnal-321ddf2422d3fafe29c68c2945bcc9063a238d83.tar.gz cygnal-321ddf2422d3fafe29c68c2945bcc9063a238d83.tar.bz2 cygnal-321ddf2422d3fafe29c68c2945bcc9063a238d83.zip |
* fhandler.h (class fhandler_socket): Remove has_been_closed member.
* fhandler_socket.cc (fhandler_socket::recvfrom): Revert to
overlapped I/O.
(fhandler_socket::recvmsg): Ditto.
(fhandler_socket::sendto): Ditto.
(fhandler_socket::sendmsg): Ditto.
* net.cc (wsock_event::prepare): Ditto.
(wsock_event::wait): Ditto. Evaluate overlapped result also after
calling CancelIo (thanks to Patrick Samson <p_samson@yahoo.com>).
(wsock_event::release): Remove.
* wsock_event.h: Revert to overlapped I/O.
Diffstat (limited to 'winsup/cygwin/wsock_event.h')
-rw-r--r-- | winsup/cygwin/wsock_event.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/winsup/cygwin/wsock_event.h b/winsup/cygwin/wsock_event.h index 5383a797b..3f8638134 100644 --- a/winsup/cygwin/wsock_event.h +++ b/winsup/cygwin/wsock_event.h @@ -14,13 +14,19 @@ details. */ class wsock_event { WSAEVENT event; + WSAOVERLAPPED ovr; public: wsock_event () : event (NULL) {}; + ~wsock_event () + { + if (event) + WSACloseEvent (event); + event = NULL; + }; /* The methods are implemented in net.cc */ - bool prepare (int sock, long event_mask); - int wait (int sock, int &closed); - void release (int sock); + LPWSAOVERLAPPED prepare (); + int wait (int socket, LPDWORD flags); }; #endif /* __WSOCK_EVENT_H__ */ |