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(std::string_view esm)#

Create and track a new channel.

Parameters:

esm – - JavaScript esm module with setup callback.

Returns:

A shared porter to the channel.

Karana::Core::ks_ptr<class Channel> channel(const std::filesystem::path &esm)#

Create and track a new channel.

Parameters:

esm – - JavaScript esm module with setup callback.

Returns:

A shared porter to the channel.

inline Karana::Core::ks_ptr<class Channel> channel(const std::string &esm)#