IXWebSocket/ixwebsocket/IXSelectInterruptEventFd.h

33 lines
623 B
C
Raw Normal View History

2019-03-15 02:37:38 +01:00
/*
* IXSelectInterruptEventFd.h
* Author: Benjamin Sergeant
* Copyright (c) 2018-2019 Machine Zone, Inc. All rights reserved.
*/
#pragma once
#include "IXSelectInterrupt.h"
#include <stdint.h>
#include <string>
namespace ix
{
2019-05-12 20:43:21 +02:00
class SelectInterruptEventFd final : public SelectInterrupt {
2019-03-15 02:37:38 +01:00
public:
SelectInterruptEventFd();
virtual ~SelectInterruptEventFd();
bool init(std::string& errorMsg) final;
bool notify(uint64_t value) final;
bool clear() final;
uint64_t read() final;
2019-03-15 19:41:57 +01:00
int getFd() const final;
2019-03-15 02:37:38 +01:00
private:
int _eventfd;
};
}