I have used this solution to load the frames of Ip Camera. When the camera is not connected, I get exception. Is there a way to check if the camera is connected? In the other hand, can I check if my client can connect to server in the poco?
Asked
Active
Viewed 1,035 times
1 Answers
0
Wrap your code in try/catch. If you get exception, something went wrong.
try
{
//this will throw Poco::Net::ConectionRefusedException
session.sendRequest(req);
//...
}
catch(Poco::Net::ConectionRefusedException& ex)
{
// handle error
}

Alex
- 5,159
- 4
- 25
- 33