SNode.C
Loading...
Searching...
No Matches
DescriptorEventPublisher.h
Go to the documentation of this file.
1/*
2 * SNode.C - a slim toolkit for network communication
3 * Copyright (C) Volker Christian <me@vchrist.at>
4 * 2020, 2021, 2022, 2023, 2024, 2025
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published
8 * by the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef CORE_POLL_DESCRIPTOREVENTDISPATCHER_H
21#define CORE_POLL_DESCRIPTOREVENTDISPATCHER_H
22
23#include "core/DescriptorEventPublisher.h" // IWYU pragma: export
24
25namespace core::multiplexer::poll {
26 class PollFdsManager;
27} // namespace core::multiplexer::poll
28
29#ifndef DOXYGEN_SHOULD_SKIP_THIS
30
31#include <string> // IWYU pragma: export
32
33#endif /* DOXYGEN_SHOULD_SKIP_THIS */
34
35namespace core::multiplexer::poll {
36
38 public:
39 DescriptorEventPublisher(const std::string& name, core::multiplexer::poll::PollFdsManager& pollFds, short events, short revents);
40
41 private:
42 void muxAdd(core::DescriptorEventReceiver* eventReceiver) override;
43 void muxDel(int fd) override;
44 void muxOn(core::DescriptorEventReceiver* eventReceiver) override;
45 void muxOff(core::DescriptorEventReceiver* eventReceiver) override;
46
47 void spanActiveEvents() override;
48
49 core::multiplexer::poll::PollFdsManager& pollFds;
50 short events;
51 short revents;
52 };
53
54} // namespace core::multiplexer::poll
55
56#endif // CORE_POLL_DESCRIPTOREVENTDISPATCHER_H
core::multiplexer::poll::PollFdsManager & pollFds
DescriptorEventPublisher(const std::string &name, core::multiplexer::poll::PollFdsManager &pollFds, short events, short revents)
void muxOff(core::DescriptorEventReceiver *eventReceiver) override
void muxAdd(core::DescriptorEventReceiver *eventReceiver) override
void muxOn(core::DescriptorEventReceiver *eventReceiver) override
void muxOff(const DescriptorEventReceiver *eventReceiver, short event)
void muxAdd(core::DescriptorEventReceiver *eventReceiver, short event)
void muxOn(const core::DescriptorEventReceiver *eventReceiver, short event)