Reputation: 19
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 sleep 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 ?
Upvotes: 1
Views: 895
Reputation: 54345
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.
Upvotes: 2