[zeromq-dev] Access to underlying Linux socket?

Pieter Hintjens ph at imatix.com
Wed Feb 10 20:45:25 CET 2016


You can't do this really, since one ZeroMQ socket can map to 0..n
system sockets.

There is a new option on libzmq master that lets you pre-configure a
FD and give it to ZeroMQ to use for its first pipe. (ZMQ_USE_FD).

A custom hook to configure new sockets is a nice idea.

-Pieter

On Wed, Feb 10, 2016 at 6:29 PM, Jerry Scharf
<scharf at lagunawayconsulting.com> wrote:
> Mark,
>
> As a comment from the peanut gallery, it is generally a bad thing to
> leak that information up the protocol stack. Rather than getting that
> information back, it might be better to be able to attach user callout
> hooks at the places where you would want to make changes. That way there
> is still a unified code base and you can write and install your hook
> code to do your special work. It also allows people to do other things
> without needing to invent another mechanism.
>
> That's the way I have liked it the best when these things came up with
> other systems.
>
> jerry
>
> On 02/10/2016 07:50 AM, Mark Gillott wrote:
>> [I'm sure this must have been asked before, but can't find anything]
>>
>> Is there a facility or method to "map" a 0MQ socket to its supporting
>> Linux socket?
>>
>> Working with a Linux kernel that has some new networking facility
>> together with socket extensions to control the facility. With vanilla
>> sockets this results in calls to setsockopt(sockfd, SOL_SOCKET, ...).
>>
>> But how do I manage 0MQ sockets wanting to enable/control this facility?
>> Can I obtain the Linux socket and thus use native setsockopt() calls? Or
>> is the only option to generate (& maintain) zmq_set_xyz() & zmq_xyz()
>> patches for the base ZMQ library (together with the various language
>> binding - C, Python, Perl, etc)?
>>
>> Cheers,
>>
>> Mark
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> 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