[coro_http.websocket]Fix websocket example (#651)
This commit is contained in:
parent
38e2b7bd01
commit
09aefcb51e
|
@ -183,9 +183,8 @@ async_simple::coro::Lazy<void> use_websocket() {
|
||||||
result.type == ws_frame_type::WS_BINARY_FRAME) {
|
result.type == ws_frame_type::WS_BINARY_FRAME) {
|
||||||
std::cout << result.data << "\n";
|
std::cout << result.data << "\n";
|
||||||
}
|
}
|
||||||
|
else if (result.type == ws_frame_type::WS_PING_FRAME ||
|
||||||
if (result.type == ws_frame_type::WS_PING_FRAME ||
|
result.type == ws_frame_type::WS_PONG_FRAME) {
|
||||||
result.type == ws_frame_type::WS_PONG_FRAME) {
|
|
||||||
// ping pong frame just need to continue, no need echo anything,
|
// ping pong frame just need to continue, no need echo anything,
|
||||||
// because framework has reply ping/pong msg to client
|
// because framework has reply ping/pong msg to client
|
||||||
// automatically.
|
// automatically.
|
||||||
|
|
Loading…
Reference in New Issue