[zeromq-dev] Getting connection info from pipe_t?

Merijn Verstraaten merijn at inconsistent.nl
Sat Nov 17 19:44:39 CET 2012

On Nov 17, 2012, at 19:05 , Ian Barber wrote:
> On Sat, Nov 17, 2012 at 5:59 PM, Merijn Verstraaten <merijn at inconsistent.nl> wrote:
> I'm playing around with the ZMQ source and had a question. The socket implementations all read incoming messages from the pipe_t connected to it, but as far as I can see there is no way to identify the endpoint (IP+port or similar) associated with a pipe. Is it not possible to retrieve this information? If so, why not? If it is possible, how?
> It is not, for reasoning it goes to the principles of ZeroMQ, for which check out the guide: http://zguide.zeromq.org/page:all. You can set an identity on a connection though, which may be the kind of thing you're looking for. 

Identities aren't what I want, as I actually want to build some type of verification of identities. After an earlier discussion on the mailing list I wanted to work on implementing an authenticated router (i.e. one that verifies which identities are allowed to connect) and I was wondering if I could get identity + endpoint pairs to use in authentication. Without that info it might be simpler to just specify a function that takes an identity and returns a boolean indicating "accept/reject".

On a side note, I agree that not having providing this information to external users of the library, but I'm unsure why that information shouldn't be made available inside ZMQ? It makes disconnecting/filtering connections significantly harder...

Kind regards,
Merijn Verstraaten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121117/bd7f6966/attachment.htm>

More information about the zeromq-dev mailing list