6 library(http/hub): Manage a hub for websockets
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • library(http/hub): Manage a hub for websockets
          • hub_create/3
          • current_hub/2
          • hub_add/3
          • hub_member/2
          • hub_send/2
          • hub_broadcast/2
          • hub_broadcast/3
Availability::- use_module(library(http/hub)).
Source[det]hub_broadcast(+Hub, +Message)
[det]hub_broadcast(+Hub, +Message, :Condition)
Send Message to all websockets associated with Hub for which call(Condition, Id) succeeds. Note that this process is asynchronous: this predicate returns immediately after putting all requests in a broadcast queue. If a message cannot be delivered due to a network error, the hub is informed through io_error/3.