mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-05 20:57:40 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user