Class Router#

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.

Router(const Router&) = delete#
Router &operator=(const Router&) = delete#
virtual ~Router()#

Router destructor.

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.