Win32Event member names are conforming to the naming style of this project now.
This commit is contained in:
parent
83064ab86b
commit
f396965797
1 changed files with 10 additions and 3 deletions
13
win32event.h
13
win32event.h
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef WIN32EVENT_H
|
#ifndef WIN32EVENT_H
|
||||||
#define WIN32EVENT_H
|
#define WIN32EVENT_H
|
||||||
|
|
||||||
|
#include <WinSock2.h>
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
/** Simpel wrapper around a Win32 Event object.
|
/** 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()
|
~Win32Event()
|
||||||
{
|
{
|
||||||
CloseHandle(hEvent);
|
CloseHandle(hEvent);
|
||||||
|
|
@ -28,11 +35,11 @@ public:
|
||||||
Win32Event(const Win32Event &) = delete;
|
Win32Event(const Win32Event &) = delete;
|
||||||
Win32Event &operator=(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:
|
private:
|
||||||
HANDLE hEvent;
|
HANDLE hEvent;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue