[zeromq-dev] cleaning up TCP sockets

Pieter Hintjens ph at imatix.com
Fri Mar 22 11:20:00 CET 2013

On Fri, Mar 22, 2013 at 11:02 AM, guido <dropbox at a-nugget.de> wrote:

> This sounds like there *must* be a solution for ØMQ to work on the internets.
> TCP doesn't provide a decent solution and is used quite successfully on the net.
> Wouldn't a *should* be sufficent?

For sure. There's no perfect, just better. What I'd like as a server
author is to be able to at least ensure that I can log and manage
rogue connections. TCP offers this and servers rely on it. 0MQ's
invisible magic is great but then it does have to be robust.

> This is something that can be done with the current API, as far as I can see.
> We have the monitoring which signals new connections and we have the also new
> zmq_disconnect method.

Disconnect doesn't work on ROUTERs accepting incoming connections, which is the

> This would also be very useful for cases where a very high number of
> connections are concentrated on one host (ip address).
> Very high here means close to the max. available number of ports.


> So an application could allow ØMQ to throw away an unused connection and
> re-open it when the need arises.

Yes. It does need some cooperation so the clients don't simply
reconnect immediately.

One patch at a time.


More information about the zeromq-dev mailing list