1 #ifndef BLANK_SHARED_COMMANDSERVICE_HPP_
2 #define BLANK_SHARED_COMMANDSERVICE_HPP_
4 #include "../net/tcp.hpp"
12 : public tcp::IOHandler {
15 CommandService(CLI &, unsigned short port);
19 /// wait on incoming data for at most timeout ms
20 void Wait(int timeout) noexcept;
21 /// true if at least one connected socket can read
22 bool Ready() noexcept;
23 /// handle all inbound traffic
25 /// send all outbound traffic
28 void OnRecv(tcp::Socket &) override;