0

Please, I need some help!

I'm currently working on client-server program (sockets, Python). I decided to build it like in this guide (https://codesource.io/creating-python-socket-server-with-multiple-clients/). Each client has its own thread and connections are accepting in an infinitive loop. Sockets are using TCP.

According to the task server should support connection with at least 50 clients simultaneously. How can I ensure it? I can't find anything related to this problem.

Thanks in advance!

4
  • 1
    Python does not impose limits on the number of threads or socket file descriptors. The operating system (usually) has limits for both, e.g. 1024 file descriptors per process. Whatever those limits are, 50 is almost certainly within range. If you specify the operating system, we could look up the limits
    – Homer512
    Commented Aug 29, 2022 at 13:45
  • Of course, my fault! It's Windows OS Commented Aug 29, 2022 at 13:57
  • I don't have an authoritative source at hand but according to these semi-official articles, you are orders of magnitude below the limits. techcommunity.microsoft.com/t5/windows-blog-archive/… learn.microsoft.com/en-us/archive/blogs/markrussinovich/… You could also simply test it by starting 50 client processes, right?
    – Homer512
    Commented Aug 29, 2022 at 14:06
  • Don't put anything that stops it from having more than 50. If you do it right it should just work. If you want to test it, you can simply connect to it 50 times at the same time, and see whether it works.
    – user20574
    Commented Aug 29, 2022 at 15:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.