Class Router#
Defined in File Router.h
Class Documentation#
-
class Router#
Manager for multiplexing messages on a websocket.
See WebUI for more discussion on WebUI.
Public Functions
-
Router(const Karana::Core::ks_ptr<HttpWsServer> &server)#
Router constructor.
- Parameters:
server – - the websocket server.
-
Karana::Core::ks_ptr<class Channel> channel(const ContentSource &esm, const ContentSource &css = {}, std::string_view init_msg = {})#
Create and track a new channel.
- Parameters:
esm – - JavaScript esm module with setup callback.
css – - CSS to ensure is added to the page.
init_msg – - Static message to send to new channel frontends.
- Returns:
A shared porter to the channel.
-
Router(const Karana::Core::ks_ptr<HttpWsServer> &server)#