[zeromq-dev] general question about connect before bind
cremes.devlist at mac.com
Tue Nov 23 16:47:51 CET 2010
On Nov 23, 2010, at 9:31 AM, Martin Sustrik wrote:
> Hi Koert,
>> Having used zeromq in a few small applications I now am used to the
>> behavior that it typically doesn’t matter if a connect happens before a
>> bind. It is great. However how does it work?
>> If say I have a server on machine 101 and a client on 201, and my
>> protocol is tcp, how can the client connect before the server has done
>> the bind to the endpoint? I mean, I assume the bind opens a tcp port or
>> something like that, so before that the client’s request for connection
>> should be refused, no?
> The connecting site tries to reconnect in periodic intervals. Once the
> other side binds, connect succeeds.
please note that this behavior does *not* work with "inproc" endpoints. You *must* bind those endpoints before anyone tries to connect. There is an open issue on this.
More information about the zeromq-dev