321ddf2422
* 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.
33 lines
658 B
C++
33 lines
658 B
C++
/* wsock_event.h: Defining the wsock_event class
|
|
|
|
Copyright 2002 Red Hat, Inc.
|
|
|
|
This file is part of Cygwin.
|
|
|
|
This software is a copyrighted work licensed under the terms of the
|
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
|
details. */
|
|
|
|
#ifndef __WSOCK_EVENT_H__
|
|
#define __WSOCK_EVENT_H__
|
|
|
|
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 */
|
|
LPWSAOVERLAPPED prepare ();
|
|
int wait (int socket, LPDWORD flags);
|
|
};
|
|
|
|
#endif /* __WSOCK_EVENT_H__ */
|