openMSX
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#include <string>
7#include <thread>
8
9namespace openmsx {
10
11class CommandController;
12class EventDistributor;
13class GlobalCliComm;
14
15class CliServer final
16{
17public:
18 CliServer(CommandController& commandController,
19 EventDistributor& eventDistributor,
20 GlobalCliComm& cliComm);
21 ~CliServer();
22
23private:
24 void mainLoop();
25 [[nodiscard]] SOCKET createSocket();
26 void exitAcceptLoop();
27
28private:
29 CommandController& commandController;
30 EventDistributor& eventDistributor;
31 GlobalCliComm& cliComm;
32
33 std::thread thread;
34 std::string socketName;
35 SOCKET listenSock;
36 Poller poller;
37};
38
39} // namespace openmsx
40
41#endif
CliServer(CommandController &commandController, EventDistributor &eventDistributor, GlobalCliComm &cliComm)
Definition: CliServer.cc:195
Polls for events on a given file descriptor.
Definition: Poller.hh:15
This file implemented 3 utility functions:
Definition: Autofire.cc:9
int SOCKET
Definition: Socket.hh:23