开发者

POCO C++ and computer sleep and wake up

开发者 https://www.devze.com 2023-03-24 02:12 出处:网络
My problem is like this. I\'m creating a service with poco and I\'m using network drivers for random operations. The problem is that when machine goes to sl开发者_C百科eep windows 7 unpludges the netw

My problem is like this. I'm creating a service with poco and I'm using network drivers for random operations. The problem is that when machine goes to sl开发者_C百科eep windows 7 unpludges the network drivers leaving me non-working handlers. So is there a way to catch a sleep signal with POCO , and do a clean unintialiaze / reinitialize when the machine wakes up ?


Why not just detect the connection failure and retry the operation? You should have this anyway.

Network operations can fail for many reasons. Maybe a switch or a router failed. Maybe the remote system suffered a failure and its failover partner has just taken over its IP address.

0

精彩评论

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