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

Jon Dyte jon at totient.co.uk
Tue Sep 27 22:53:47 CEST 2011


Pieter Hintjens wrote:
> On Tue, Sep 27, 2011 at 2:38 PM, Jon Dyte <jon at totient.co.uk> wrote:
>
>   
>> that's not the case it's 3.0 that's removed socketpair and replaced it
>> with eventfd which is linux only.
>> The windows stuff still uses some tcp connections underneath, even for
>> inproc.
>>     
>
> Issue 231, we fixed the frequent mailbox.cpp:183 assert by backporting
> the change from 3.0. This was put into 2.1.8, also on Windows afaics.
>
> -Pieter
>   

That issue was to stop the socketpair filling up with commands and then 
the subsequent flakiness in trying to increase the buffer size
The fix was to write a single byte down the pipe and pass the command in 
a memory structure.

the code here signaler::make_fdpair hand builds a connection on 
windows/vms and socketpair elsewhere
https://github.com/zeromq/zeromq2-1/blob/master/src/signaler.cpp

There is a further optimisation on platforms which supply eventfd in 3.0 
because if you are only
using a single byte socketpair write then event fd  is a better 
signaling mechanism which gives a descriptor
that can be used with poll/epoll etc etc. (This was a secondary patch 
though)


Jon



> _______________________________________________
> 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