How QT handle the concurrency network request?
Solved
General and Desktop
-
the requirement :
one sever as matser node ,many client as slave node .
slave nodes collect some real-time information of themselves ,once the network set ready .slave node push the information to matser node on their own periodically(for example :node 1 period is 10 seconds ,node 2 is another value) .
My question:
- can I use the udpsocket to achieve this goal ?
- if use tcpsocket,should I need mutil-thread to handle this problem ?assume there is 100 node ,that is to say i need use 100 thread ?
3.every connection need a timer to control it ?
so what are usual ways that experienced developers to handle this situation ? or maybe i should use some other third library as
boost asio
?I have heard the methodNIO channel
in JAVA, so i want to find the same method in QT,does it exist ? -
but i don;t think 100 threads in one process is a good ideal
-