ConnectToServer
This method connects the client to the WebSocket server using the URI specified in the serverUri variable.
What it does: Attempts to connect to the WebSocket server. If successful, it starts receiving messages from the server asynchronously.
How to use it: Call this method to initiate the WebSocket connection.
Usage:
Example:
Last updated