Win32Event member names are conforming to the naming style of this project now.

This commit is contained in:
Eelke Klein 2017-01-06 07:21:57 +01:00
parent 83064ab86b
commit f396965797

View file

@ -1,6 +1,7 @@
#ifndef WIN32EVENT_H
#define WIN32EVENT_H
#include <WinSock2.h>
#include <windows.h>
/** Simpel wrapper around a Win32 Event object.
@ -20,6 +21,12 @@ public:
))
{}
Win32Event(Reset r, Initial is, int sock, long net_events)
: Win32Event(r, is)
{
WSAEventSelect(sock, hEvent, net_events);
}
~Win32Event()
{
CloseHandle(hEvent);
@ -28,11 +35,11 @@ public:
Win32Event(const Win32Event &) = delete;
Win32Event &operator=(const Win32Event &) = delete;
void Set() { SetEvent(hEvent); }
void set() { SetEvent(hEvent); }
void Reset() { ResetEvent(hEvent); }
void reset() { ResetEvent(hEvent); }
HANDLE GetHandle() { return hEvent; }
HANDLE handle() { return hEvent; }
private:
HANDLE hEvent;
};