Did you know ... Search Documentation:
Predicate hub_create/3
 hub_create(+Name, -Hub, +Options) is det[private]
Create a new hub. Hub is a dict containing the following public information:
The name of the hub (the Name argument)
Message queue to which the hub thread(s) can listen.

After creating a hub, the application normally creates a thread that listens to Hub.queues.event and exposes some mechanisms to establish websockets and add them to the hub using hub_add/3.

See also
- http_upgrade_to_websocket/3 establishes a websocket from the SWI-Prolog webserver.