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:17
Socket.hh
openmsx::EventDistributor
Definition: EventDistributor.hh:16
openmsx::GlobalCliComm
Definition: GlobalCliComm.hh:15
openmsx::Poller
Polls for events on a given file descriptor.
Definition: Poller.hh:13
openmsx::CliServer::CliServer
CliServer(CommandController &commandController, EventDistributor &eventDistributor, GlobalCliComm &cliComm)
Definition: CliServer.cc:198
openmsx::CliServer
Definition: CliServer.hh:15
Poller.hh
openmsx::CliServer::~CliServer
~CliServer()
Definition: CliServer.cc:215
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5