erickt / rust-zmq

Rust zeromq bindings.
Apache License 2.0
887 stars 189 forks source link

Binding for `zmq_unbind` missing #271

Closed rotty closed 4 years ago

rotty commented 5 years ago

This should be quite simple to add, so I'll leave this open in case someone feels like trying their hand.

jean-airoldie commented 4 years ago

zmq_unbind doesnt do anything different than zmq_disconnect. However, from what I understand, this might change in the future without notice.

rotty commented 4 years ago

Indeed, quoting the zmq_unbind manpage:

Note that while the implementation is similar to zmq_disconnect(), the semantics are different and the two functions should not be used interchangeably. Bound sockets should be unbound, and connected sockets should be disconnected.

jean-airoldie commented 4 years ago

Yes, but if you actually look at the implementation, its the same. https://github.com/zeromq/libzmq/blob/0858038367d43665221b8ab701471ba8d9b232bd/src/zmq.cpp#L339.