[zeromq-dev] ZMQ occupies random TCP ports on Windows

Michał Sznajder michalsznajder at gmail.com
Tue Sep 27 20:23:54 CEST 2011

On Tue, Sep 27, 2011 at 6:43 PM, Chuck Remes <cremes.devlist at mac.com> wrote:
> On Sep 27, 2011, at 11:20 AM, Michał Sznajder wrote:
>> On Tue, Sep 27, 2011 at 6:01 PM, Chuck Remes <cremes.devlist at mac.com> wrote:
>>> On Sep 27, 2011, at 10:51 AM, Michał Sznajder wrote:
>>>> I have an application on Windows that is run in multiple instances on
>>>> many boxes. Instances may come an go in random order. Instances use
>>>> predefined "connection strings" to zmq_bind(). Both tcp:// and
>>>> inproc:// are in use.
>> I was thinking of this, eg. convert all my inproc into tcp. But even
>> something as simple as
>>    ZMQ.Context ctx = new ZMQ.Context(1);
>> creates 4 TCP connections... Without even getting any socket or bind...
> Wait, now you are talking about inproc transport. That does *not* use any tcp connections. It merely flips pointers around between sockets.

>From the beginning I was talking of inproc:// :) And I was surprised
when I discovered that using inproc:// requires local TCP connection.
Apparently ZMQ needs a class named signaler to do some sync between
threads. Under UNIX this is implemented as a wrapper over
socketpair(3). But under Windows as pair of TCP sockets. Compare with
https://github.com/zeromq/zeromq2-1/blob/master/src/signaler.cpp .

Could someone prove me wrong?


More information about the zeromq-dev mailing list