(ws send + receive) handle all message types (ping + pong + fragment) / investigate #140

This commit is contained in:
Benjamin Sergeant 2020-01-04 13:45:07 -08:00
parent 221087ffff
commit 31682f5f2d
4 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,10 @@
# Changelog
All changes to this project will be documented in this file.
## [7.8.9] - 2020-01-04
(ws send + receive) handle all message types (ping + pong + fragment) / investigate #140
## [7.8.8] - 2019-12-28
(mbedtls) fix related to private key file parsing and initialization

View File

@ -6,4 +6,4 @@
#pragma once
#define IX_WEBSOCKET_VERSION "7.8.8"
#define IX_WEBSOCKET_VERSION "7.8.9"

View File

@ -234,6 +234,14 @@ namespace ix
ss << "HTTP Status: " << msg->errorInfo.http_status << std::endl;
log(ss.str());
}
else if (msg->type == ix::WebSocketMessageType::Ping)
{
log("ws_receive: received ping");
}
else if (msg->type == ix::WebSocketMessageType::Pong)
{
log("ws_receive: received pong");
}
else
{
ss << "ws_receive: Invalid ix::WebSocketMessageType";

View File

@ -166,6 +166,18 @@ namespace ix
ss << "HTTP Status: " << msg->errorInfo.http_status << std::endl;
log(ss.str());
}
else if (msg->type == ix::WebSocketMessageType::Ping)
{
spdlog::info("ws_send: received ping");
}
else if (msg->type == ix::WebSocketMessageType::Pong)
{
spdlog::info("ws_send: received pong");
}
else if (msg->type == ix::WebSocketMessageType::Fragment)
{
spdlog::info("ws_send: received fragment");
}
else
{
ss << "ws_send: Invalid ix::WebSocketMessageType";