[zeromq-dev] How to read client's IP address from zmqsocket using tcp

Martin Sustrik sustrik at 250bpm.com
Thu Jun 16 10:28:01 CEST 2011


Hi Helge,

> I wonder if it's possible to read the client's IP address from a
> zmqsocket which is connected through tcp.  I know that the server socket
> generates an abstract SenderId if the client doesn't use an explicit
> identity. But this seems to be rather some type of GUID. I know that I
> could make the client's IP address an explicit part of the message but I
> would rather read the IP address of some kind of metadata that the
> socket generates...

No there's no way to find out. Given that each 0MQ socket can have 0 to 
N underlying TCP or non-TCP connections, it doesn't even make much sense.

Martin



More information about the zeromq-dev mailing list