2002-02-09 18:40:48 +08:00
|
|
|
/* 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;
|
2004-04-04 03:07:59 +08:00
|
|
|
WSAOVERLAPPED ovr;
|
2002-02-09 18:40:48 +08:00
|
|
|
public:
|
|
|
|
wsock_event () : event (NULL) {};
|
2004-04-04 03:07:59 +08:00
|
|
|
~wsock_event ()
|
|
|
|
{
|
|
|
|
if (event)
|
|
|
|
WSACloseEvent (event);
|
|
|
|
event = NULL;
|
|
|
|
};
|
2002-02-09 18:40:48 +08:00
|
|
|
|
|
|
|
/* The methods are implemented in net.cc */
|
2004-04-04 03:07:59 +08:00
|
|
|
LPWSAOVERLAPPED prepare ();
|
|
|
|
int wait (int socket, LPDWORD flags);
|
2002-02-09 18:40:48 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __WSOCK_EVENT_H__ */
|