Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Fix Pong payload #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client_ws.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,9 @@ namespace SimpleWeb {
connection->set_timeout();

// Send pong
auto empty_send_stream = std::make_shared<SendStream>();
connection->send(empty_send_stream, nullptr, connection->message->fin_rsv_opcode + 1);
auto pong_stream = std::make_shared<SendStream>();
*pong_stream << connection->message->string();
connection->send(pong_stream, nullptr, connection->message->fin_rsv_opcode + 1);

if(this->on_ping)
this->on_ping(connection);
Expand Down
5 changes: 3 additions & 2 deletions server_ws.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,9 @@ namespace SimpleWeb {
connection->set_timeout();

// Send pong
auto empty_send_stream = std::make_shared<SendStream>();
connection->send(empty_send_stream, nullptr, fin_rsv_opcode + 1);
auto pong_stream = std::make_shared<SendStream>();
*pong_stream << message->string();
connection->send(pong_stream, nullptr, fin_rsv_opcode + 1);

if(endpoint.on_ping)
endpoint.on_ping(connection);
Expand Down