Problem: libzmq does not send ZMTP 3.1 sub/cancel commands

Solution: if all peers of a socket are >= 3.1 use sub/cancel commands
instead of the old 0/1 messages.
For backward compatibility, move the handling of 0/1 or sub/cancel
command strings to the encoders, so that the right thing can be done
depending on the protocol version.
Do not set the command flag until the encoder, so that we can handle
the inproc case (which skips the encoder).
This commit is contained in:
Luca Boccassi
2018-05-28 19:59:44 +01:00
parent e7f802d1ac
commit 253e9dd27b
16 changed files with 432 additions and 128 deletions

View File

@@ -46,7 +46,7 @@ class v1_encoder_t ZMQ_FINAL : public encoder_base_t<v1_encoder_t>
void size_ready ();
void message_ready ();
unsigned char _tmpbuf[10];
unsigned char _tmpbuf[11];
ZMQ_NON_COPYABLE_NOR_MOVABLE (v1_encoder_t)
};