开发者

Server application have to make pings to N clients. Is there way to make it multithreaded?

开发者 https://www.devze.com 2022-12-11 13:23 出处:网络
I write server application (Windows Server 2003) making upto 1000 ping calls to clients and waiting for receive responses. As ping uses ICMP connection, I\'ve found no way to define from which IP the

I write server application (Windows Server 2003) making upto 1000 ping calls to clients and waiting for receive responses. As ping uses ICMP connection, I've found no way to define from which IP the server receives the responses. Currently I use blocking by Mutex but it practically removes all bonus of multhithreading. Is there another way to make it in multithreaded way开发者_运维问答? May be I should use another way to connect to clients (the target is to check in fastest way if there is connection to clients)?


try boost::asio asynchronous connection capability; that way you will not need multiple threads

0

精彩评论

暂无评论...
验证码 换一张
取 消