On 07.10.2016 10:14, Laughing wrote:
    *>>>* Is that mean that socket.disconnect does not disconnect from
    all endpoint connected before?

see http://api.zeromq.org/4-1:zmq-disconnect

        int zmq_disconnect (void *socket, const char *endpoint);

zmq_disconnect disconnects the socket from the given endpoint *only*.

    *>>> *It is a so bad news. I would like to use the disconnect
    routine to discard messages in 'REQ/REP' and 'PUSH/PULL' mode.

A ZeroMQ socket holds received messages in a queue.

To empty the queue, you can

        a. receive and discard the messages until zmq_poll tells
           you there is no data

        b. destroy, then recreate & reconnect the socket

I do not know the internal details, for example whether a socket has a queue per connection.

The bug seems to point towards some data management problem between queues in the socket.



_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to