ping pong example: more error handling

This commit is contained in:
Benjamin Sergeant 2018-10-25 14:46:23 -07:00
parent 2bc38acbb1
commit ac500ed079

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)