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