Skip to main content

Module server

Module server 

Source
Expand description

The HTTP side (WebSocket /ws, GET /health, /stats, /tags) and the server that ties the hub and the PLC workers together.

Structs§

ServerHandle
A server running on its own threads, for embedding (bindings, tests).

Functions§

run
Binds the config’s host and port and serves until Ctrl+C.
serve
Serves on listener until shutdown completes, then closes the WebSockets, releases every pressed button, stops the PLC workers (their queued writes still go out) and flushes the audit log.