openMSX
events
CliServer.hh
Go to the documentation of this file.
1
#ifndef CLISERVER_HH
2
#define CLISERVER_HH
3
4
#include "
Poller.hh
"
5
#include "
Socket.hh
"
6
7
#include <string>
8
#include <thread>
9
10
namespace
openmsx
{
11
12
class
CommandController;
13
class
EventDistributor;
14
class
GlobalCliComm;
15
16
class
CliServer
final
17
{
18
public
:
19
CliServer
(
CommandController
& commandController,
20
EventDistributor
& eventDistributor,
21
GlobalCliComm
& cliComm);
22
~CliServer
();
23
24
private
:
25
void
mainLoop();
26
[[nodiscard]]
SOCKET
createSocket();
27
void
exitAcceptLoop();
28
29
private
:
30
CommandController
& commandController;
31
EventDistributor
& eventDistributor;
32
GlobalCliComm
& cliComm;
33
34
std::thread thread;
35
std::string socketName;
36
SOCKET
listenSock =
OPENMSX_INVALID_SOCKET
;
37
Poller
poller;
38
[[no_unique_address]]
SocketActivator
socketActivator;
39
};
40
41
}
// namespace openmsx
42
43
#endif
Poller.hh
Socket.hh
openmsx::CliServer
Definition
CliServer.hh:17
openmsx::CliServer::~CliServer
~CliServer()
Definition
CliServer.cc:214
openmsx::CommandController
Definition
CommandController.hh:19
openmsx::EventDistributor
Definition
EventDistributor.hh:19
openmsx::GlobalCliComm
Definition
GlobalCliComm.hh:20
openmsx::Poller
Polls for events on a given file descriptor.
Definition
Poller.hh:15
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
openmsx::OPENMSX_INVALID_SOCKET
constexpr int OPENMSX_INVALID_SOCKET
Definition
Socket.hh:23
openmsx::SOCKET
int SOCKET
Definition
Socket.hh:25
openmsx::SocketActivator
Definition
Socket.hh:46
Generated on Sat Dec 21 2024 14:13:51 for openMSX by
1.9.8