ping pong example: more error handling

This commit is contained in:
Benjamin Sergeant 2018-10-25 14:46:23 -07:00
parent 208c693088
commit 8ac36e6ee5

View File

@ -102,7 +102,11 @@ namespace
void WebSocketPingPong::ping(const std::string& text)
{
_webSocket.ping(text);
if (!_webSocket.ping(text))
{
std::cerr << "Failed to send ping message. Message too long (> 125 bytes) or endpoint is disconnected"
<< std::endl;
}
}
void interactiveMain(const std::string& url)