Welcome to mirror list, hosted at ThFree Co, Russian Federation.

wsock_event.h « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3f863813492b0340200f14ae1a9ff565e56f4cfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* 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__ */