| 228 | } // namespace console_server_internal |
| 229 | |
| 230 | ConsoleServer::ConsoleServer(Allocator &a) |
| 231 | : _port(UINT16_MAX) |
| 232 | , _next_client_id(0) |
| 233 | , _clients(a) |
| 234 | , _messages(a) |
| 235 | , _commands(a) |
| 236 | , _thread_exit(false) |
| 237 | , _input_0(a) |
| 238 | , _input_1(a) |
| 239 | , _input_write(&_input_0) |
| 240 | , _input_read(&_input_1) |
| 241 | , _output_0(a) |
| 242 | , _output_1(a) |
| 243 | , _output_write(&_output_0) |
| 244 | , _output_read(&_output_1) |
| 245 | { |
| 246 | this->register_message_type("command", console_server_internal::message_command, this); |
| 247 | this->register_command_name("help", "List all commands.", console_server_internal::command_help, this); |
| 248 | } |
| 249 | |
| 250 | bool ConsoleServer::listen(u16 port, bool wait, const char *port_file, u16 default_port) |
| 251 | { |
nothing calls this directly
no test coverage detected