Class WebSocketClient() Professional
Class function of the WebSocketClient class.
Use the WebSocketClient class to implement the client of a websocket connection. A user-defined websocket client is derived from the class WebSocketClient and implements the methods ::onConnect(), :onDisconnect(), :onText()and :onBinary().
The example below demonstrates the implementation of the client side of a websocket connection. Refer to the example of WebSocketHandler()to see the implementation of the server side.
By default, websocket communication is unencrypted. However, the WebsocketClient class also supports establishing connections encrypted via a Secure Socket Layer (SSL). For this, 443 must be specified as the port number when creating the websocket client object via the method :new().
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.