[zeromq-dev] Forcefully drop a peer connection
Pieter Hintjens
ph at imatix.com
Fri Jul 15 06:50:28 CEST 2011
On Fri, Jul 15, 2011 at 4:14 AM, Mike Owens <mikeowens at gmail.com> wrote:
> I was testing sending random data to a ROUTER socket and ran into a
> scenario I hadn't considered. What if the random data passed through
> and is sent in to your socket for processing. Assuming your code can
> detect this, and is able to tell at that point that the remote peer is
> rogue, how can you (through the API) drop its connection? I have the
> socket ID given by the ROUTER socket in the first message, but there
> doesn't seem to be any way through the API to forcefully disconnect
> that remote peer -- drop the connection. Or is there a way? Just
> looking at the API reference, I can't seem to find anything that does
> that.
There is no way to do this with the current version of 0MQ. It's
something we're planning to add.
The best strategy today is to either ignore bad input, or reply with a
challenge command (assuming your protocol uses a challenge/response
security model).
-Pieter
More information about the zeromq-dev
mailing list