we use var abc = new WebSocket(url) to connect make new connection in websocket so in socket.io what we used to connect it or how can i do it please answer.
Asked
Active
Viewed 64 times
1 Answers
0
How you connect a Socket.IO client to the server depends on each client. If you are using the JavaScript client on the browser you can do something like this:
socket = io();
Or if you need to connect to a 3rd party server:
socket = io('https://my.domain.com');

Miguel Grinberg
- 65,299
- 14
- 133
- 152
-
Thanks for the help. So can i use socket.on or socket.send event function using socket variable. – Abhishek Kumar May 05 '20 at 06:38