Igal edited this page May 27, 2017 · 10 revisions

The WebSocket API is Event-Driven, meaning that you implement in your code event handlers, which are called when the corresponding events are triggered.

You do that by creating a Listener Component API which implements any of the event handlers, and then you register that Listener Component with the WebSocket endpoint by using the WebsocketRegister() function.

Many of the event handlers receive a WebSocket object as an argument, which allows you to interact with the remote connection on a low level, or retrieve information or references to other useful objects.

One of those useful objects is the ConnectionManager, which keeps track of the active connections, and lets you broadcast messages to different channels.

See also:

JavaScript WebSocket Client

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.