nanome.beta.nanome_sdk.plugin_server module

class PluginServer[source]

Bases: object

connect_plugin(name, description)[source]

Send a packet to NTS to register plugin.

handle_session_log_packet(packet)[source]

If the packet is a log message, use loggers in current process to handle it.

This provides a way of rendering logs from session processes, without sending them directly to stdout.

keep_alive(plugin_id)[source]

Long running task to send keep alive packets to NTS.

poll_nts()[source]

Poll NTS for packets, and forward them to the plugin server.

poll_session(process)[source]

Poll a session process for packets, and forward them to NTS.

route_bytes(received_bytes)[source]

Route bytes from NTS to the appropriate session.

run(nts_host, nts_port, plugin_name, description, plugin_class)[source]
start_session_process(version_table, packet, plugin_class)[source]