[zeromq-dev] How to disconnect a peer from ZMQ ROUTER socket?
Wes Young
wes at barely3am.com
Tue Aug 2 13:56:32 CEST 2016
+1
also:
https://github.com/zeromq/zyre/blob/055219523325cef4e87941e07abc39718d7350e4/src/zyre_node.c#L948
moving to a pattern where you’re actively tracking peers as part of “the loop” and forcefully expiring them when they’re un-responsive (active management) is probably more the way to go.
> On Aug 2, 2016, at 7:52 AM, Kevin Sapper <kevinsapper88 at gmail.com> wrote:
>
> Hi Dharani,
>
> have a look how zyre handles peers:
> https://github.com/zeromq/zyre/blob/055219523325cef4e87941e07abc39718d7350e4/src/zyre_node.c#L555
>
> //Kevin
>
>
>
> 2016-08-02 11:37 GMT+00:00 dharani kumar <dharanikumarsrvn at gmail.com>:
> Hi,
> I have a vpn network where the zmq router is installed on node with static ip and all peers are installed on nodes with dynamic ip which means the ip will change every time the vpn connection is made. If a peer node unfortunately disconnects from the vpn network, the router wont be aware of this disconnected peer. If the same peer reconnect to vpn but unfortunately gets a different ip, it won't able to connect to router with same identity but different ip.
>
> I can write a ping-pong code to detect dead peer but how to delete the dead peer from router socket registry so that it allows new connection for the same identity but from a different ip?
>
> Regards,
> Dharani kumar
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
--
wes
wesyoung.me
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160802/a8c366c1/attachment.sig>
More information about the zeromq-dev
mailing list