Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What port should I run my Socket.IO server on?

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.

like image 753
kidcapital Avatar asked Dec 10 '11 07:12

kidcapital


People also ask

What port should I use for socket IO?

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.

Is socket IO TCP connection?

Websocket is a computer communication protocol that enables full-duplex communication between the client and server over a single TCP connection.

Does socket IO need HTTP?

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 .


1 Answers

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.

like image 125
bennedich Avatar answered Nov 11 '22 14:11

bennedich