S
S
Sergey Ermakov2016-02-21 23:01:18
Python
Sergey Ermakov, 2016-02-21 23:01:18

How to organize a server for data exchange?

1. Sorry for the noob questions, but if such a simple server in the interval of 100 ms will receive and process requests and then send them back to the sender, requests from 10,000 users, is this very stupid?
2. He just simply can not manage to process all the requests?
3. And if each request is processed in a new thread, is it right to do so?

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('', 10000))
while True:
   recv, addr = sock.recvfrom(1024)
   myFunc(recv)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question