Websocket and http on the same port?

Is it a good idea to run the websocket server and web server on one port?

Whether to use a subdomain for this?

Reason: not always users have opened the ports except 80,443, and in all examples obsolete what I saw, mainly used on port 3000.
June 26th 19 at 14:09
1 answer
June 26th 19 at 14:11
Some nonsense.
As the two TCP servers can be running on one port?
Who cares if the ports are open the user? The user would like the port 45078, think randomly, not 80.
Hard to imagine a computer that can only connect to servers with port 80, that is in fact fundamentally supports only HTTP/HTTPS, there's always the messengers with custom protocols, and other applications... what is needed?
You misunderstood the question and turned everything on its head.

1. Two TCP servers can be running on one port
2. It's not about the ports of the client. - antonetta.Greenfelder77 commented on June 26th 19 at 14:14
: 1. No, you can't. Try it on 1 server to run Apache 2 with the same configuration file.
2. Written "user" means the customer. And if you have a user is admin of the server, it all turned on its head, not me. - Kara.Nader10 commented on June 26th 19 at 14:17
: stackoverflow.com/questions/13791050/is-it-possibl... - antonetta.Greenfelder77 commented on June 26th 19 at 14:20

Find more questions by tags WebSocket