ping pong example: more error handling
This commit is contained in:
parent
208c693088
commit
8ac36e6ee5
@ -102,7 +102,11 @@ namespace
|
|||||||
|
|
||||||
void WebSocketPingPong::ping(const std::string& text)
|
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)
|
void interactiveMain(const std::string& url)
|
||||||
|
Loading…
Reference in New Issue
Block a user