ff86860ba6
* fhandler.h: Ditto. (fhandler_socket::recv): Define new method. (fhandler_socket::send): Ditto. * fhandler_socket.cc (fhandler_socket::recv): New method. (fhandler_socket::send): Ditto. (fhandler_socket::read): Call fhandler_socket::recv() now. (fhandler_socket::write): Call fhandler_socket::send() now. * net.cc (class wsock_event): Move definition to wsock_event.h. (fdsock): Revert previous patch. (cygwin_recv): Move implementation to fhandler_socket::recv(). (cygwin_send): Move implementation to fhandler_socket::send(). * wsock_event.h: New file.
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__ */
|