TDME2  1.9.200
KernelEventMechanismPSD.h
Go to the documentation of this file.
1 #pragma once
2 
3 #if defined(_WIN32)
4  #include <winsock2.h>
5 #else
6  #include <sys/select.h>
7 #endif
8 
9 #include <unordered_map>
10 #include <vector>
11 
12 #include <tdme/tdme.h>
16 
18 
19 using std::unordered_map;
20 using std::vector;
21 
23 
24 /**
25  * Fallback/select kernel event mechanism platform specific data
26  * @author Andreas Drewke
27  */
30 
31 private:
32  struct Event {
34  int descriptor,
36  void* cookie
37  ):
40  cookie(cookie)
41  {}
44  void* cookie;
45  };
46 
47  // forbid class copy
49 
50  /**
51  * @brief Public constructor
52  */
54  maxFd(0),
55  fdsMutex("kemfallbackpsdfdmutex")
56  {
57  //
58  }
59 
60  int maxFd;
62  fd_set rfds;
63  fd_set wfds;
64  unordered_map<int, void*> fds;
65  vector<Event> events;
66 };
Interface to kernel event mechanismns.
Fallback/select kernel event mechanism platform specific data.
Mutex implementation.
Definition: Mutex.h:19
uint8_t NIOInterest
type definition for network IO interest
Definition: NIOInterest.h:10
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6