Is there any suggested ports to run Socket.IO servers on? Currently I run Socket.IO on ports 6001,6002, and 6003. However I find some people have trouble connecting to them so I was wondering if there are better ones to use.
First off, if you're using node. js to serve both your website and your socket.io connections, then you would typically use the same port for socket.io as you use for your web site (whateve port number that is). Since most websites are servered on port 80 (http) or 443 (https), that's what you would use.
Websocket is a computer communication protocol that enables full-duplex communication between the client and server over a single TCP connection.
Even when websockets can be used, the initial connection setup it done over HTTP. Also, a socket.io server will attach to an HTTP server so it can serve its own client code through /socket.io/socket.io.js .
Unless socket.IO has some odd implementation you should be able to use the regular port 80 and 443 since you are connecting with a distinct protocol.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With