cetra3 / tmq

Rust ZeroMQ bindings for Tokio
151 stars 28 forks source link

Fix: wrong naming in example client_worker #35

Closed liuzsen closed 1 year ago

liuzsen commented 1 year ago

This pr fixes a misuse of router socket in the example client_worker. In the zmq manpage, it is stated as follows.

When receiving messages a ZMQ_ROUTER socket shall prepend a message part containing the identity of the originating peer to the message before passing it to the application.

When sending messages a ZMQ_ROUTER socket shall remove the first part of the message and use it to determine the identity of the peer the message shall be routed to.

So we don't need to send client's id as a message part. But to keep the changes minimal, I kept them and named them correctly.

skrap commented 1 year ago

This seems fine to me, thanks for the contribution!