[zeromq-dev] Problem in example "A simple client/server application"
Martin Lucina
mato at kotelna.sk
Sat Feb 27 18:51:39 CET 2010
Hi,
fred at mobach.nl said:
> That R[eset] seems strange, so I checked with netstat -anp which
> revealed
> tcp 0 0 127.0.0.2:5555 0.0.0.0:* LISTEN 3180/server
>
> Well, that's not going to work. So I changed a line in server.c :
> /* Bind to the TCP transport and port 5555 on the 'lo' interface */
> rc = zmq_bind (s, "tcp://127.0.0.1:5555");
> And that's it. Then it runs as intended. But no clue why.
That's strange, looks like zmq_bind() resolved 'lo' to 127.0.0.2 for some
reason. What does 'ifconfig lo' / 'ip addr' say on your system?
> Just one question remains : were can I grab in the server environment
> the IP address and portnumber of the sending client ?
No way to do that at the moment, other than doing it at the app level (make
up a client ID / use the IP address and stick it in the message).
-mato
More information about the zeromq-dev
mailing list