problem: ws_engine don't support WS RFC close control msg

Solution: when peer send a close msg, close the connection
This commit is contained in:
Doron Somech
2020-01-18 18:44:50 +02:00
parent b120ec33a9
commit 60ef14f80b
6 changed files with 50 additions and 3 deletions

View File

@@ -454,6 +454,11 @@ bool zmq::msg_t::is_pong () const
return (_u.base.flags & CMD_TYPE_MASK) == pong;
}
bool zmq::msg_t::is_close_cmd () const
{
return (_u.base.flags & CMD_TYPE_MASK) == close_cmd;
}
size_t zmq::msg_t::command_body_size () const
{
if (this->is_ping () || this->is_pong ())