Reputation: 5424
Under what conditions it's more suitable for server to listen on multiple ports?
Upvotes: 0
Views: 360
Reputation: 3225
I don't think multiple sockets will result in any performance boost - unless the machine you use to run your application has several network interfaces in use. The real bottleneck is network latency, and sockets are just an abstraction, they can't do much here.
So, choose the amount of ports you want to use based on app requirements. I would better think of organizing socket IO in threads or processes:
When you send/receive/wait for data, do you block anything from working?
Upvotes: 1