How does the front desk initiate a webSocket request connection without Socket.io.js?

  node.js, question

The background created the webSocket service with Socket.io, but I want to create the connection with the original code.

I hope I can look at the relevant information before asking questions. This is indeed a very, very basic question. The basic code is as follows:

var ws = new WebSocket(“ws://echo.websocket.org”);
 ws.onopen = function(){ws.send(“Test!”  );   };
 ws.onmessage = function(evt){console.log(evt.data);  };
 ws.onclose = function(evt){console.log(“WebSocketClosed!”  );  };
 ws.onerror = function(evt){console.log(“WebSocketError!”  );  };