Create connection

var socket = new WebSocket(

When the connection is successfully established, the system will send a welcome message.


Only when the welcome message is received will the connection be available

  "id": "hQvf8jkno",
  "type": "welcome"

connectId: the connection id, a unique value taken from the client side. Both the id of the welcome message and the id of the error message are connectId.

If you only want to receive private messages of the specified topic, please set privateChannel to true when subscribing.