MCPcopy Create free account
hub / github.com/crownengine/crown / ConsoleServer

Method ConsoleServer

src/device/console_server.cpp:230–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228} // namespace console_server_internal
229
230ConsoleServer::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
250bool ConsoleServer::listen(u16 port, bool wait, const char *port_file, u16 default_port)
251{

Callers

nothing calls this directly

Calls 2

register_message_typeMethod · 0.95
register_command_nameMethod · 0.95

Tested by

no test coverage detected