[zeromq-dev] How to disconnect a peer?

Pieter Hintjens ph at imatix.com
Mon Sep 1 14:37:46 CEST 2014


The proper answer is probably the ping-pong heartbeating we mooted for
ZMTP v3 and eventually moved to v3.1:
http://rfc.zeromq.org/spec:37#toc24

On Mon, Sep 1, 2014 at 2:35 PM, Goswin von Brederlow <goswin-v-b at web.de> wrote:
> That doesn't answere my question though. I want to realy cut the peers
> connection and free all its resources.
>
> On Thu, Aug 28, 2014 at 07:18:11PM +0200, Pieter Hintjens wrote:
>> My usual strategy is to delete the peer after some timeout, and if the
>> peer returns, then treat it as a new peer. Secondly, treat an
>> out-of-order message as an error so that the client side can
>> re-initialize itself correctly. As example, see FILEMQ.
>>
>> On Thu, Aug 28, 2014 at 5:33 PM, Goswin von Brederlow <goswin-v-b at web.de> wrote:
>> > How do I disconnect a single peer from a ROUTER socket?
>> >
>> > The closest in the API seems to be zmq_disconnect(). But a) I didn't
>> > connect to the peer, the peer connected to me, and b) I don't have an
>> > endpoint, only a peer identity.
>> >
>> > And I can't tell the peer to disconnect since it is unresponsive.
>> >
>> >
>> > Is that something that should be there but is missing?
>> >
>> > MfG
>> >         Goswin
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list