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

@@ -59,6 +59,8 @@ void zmq::ws_encoder_t::message_ready ()
_tmp_buf[offset++] = 0x80 | zmq::ws_protocol_t::opcode_ping;
else if (in_progress ()->is_pong ())
_tmp_buf[offset++] = 0x80 | zmq::ws_protocol_t::opcode_pong;
else if (in_progress ()->is_close_cmd ())
_tmp_buf[offset++] = 0x80 | zmq::ws_protocol_t::opcode_close;
else
_tmp_buf[offset++] = 0x82; // Final | binary