Andrew Simpson
Andrew Simpson

Reputation: 7344

Should I use single or multiple web sockets

My server has a C# desktop app that accepts web socket connections from my HTML/JavaScript clients and sends back a stream of images.

Image are each 12kb in size and at least 10 of these are sent to each client every second.

At the moment I use 1 port to handle all my clients.

But, should I use different port for each connected client instead?

My server is a dedicated server hosted with FastHosts.

Would this be pointless to do as only 1 byte stream can only be sent at anyone time from my server or is the fact that it is a server it can handle many ports at the same time?

Upvotes: 1

Views: 1010

Answers (1)

vtortola
vtortola

Reputation: 35965

There is no benefit in opening different ports for the same thing in the same application. A TCP port is just a way to identify traffic, it is just like a tag.

Upvotes: 1

Related Questions