Indeed, regular sub sockets require the interest to be specified beforehand and that's what one would expect. But for a device, it would feel natural to have all the subscriptions to be forwarded from the regular sub socket down to the raw sub socket of the device. That's what I naively hoped it would do. Le mar. 17 mars 2015 09:05, Gonzalo Diethelm <gonzalo.diethelm@xxxxxxxxx> a écrit : > Cool, so my memory is not failing yet / today... > > Also, keep in mind the setsockopt call must be done at the proper place. > Again from the top of my head, before the call to bind / connect. > > Cheers, > Gonzalo > > > On Tue, Mar 17, 2015 at 8:42 AM, Bent Cardan <bent@xxxxxxxxxxxxxxxxxxxx> > wrote: > >> That's right, Gonzalo. >> >> The sub socket's default is no subscription. You'll always need to call >> setsockopt after creating it to get anything. >> >> Moreover, if we receive all: there's no way to distinguish between the >> subscribed set and any unsubscribed set. If that were the default it would >> also require a strange maneuver first in all cases to call setsockopt() >> method unsubscribing to an empty string before initiating a particular >> string subscription! >> >> On Tue, Mar 17, 2015 at 3:26 AM, Gonzalo Diethelm < >> gonzalo.diethelm@xxxxxxxxx> wrote: >> >>> From the top of my head, a SUB socket without any subscriptions will get >>> no messages at all. This is done this way to avoid flooding a newly >>> constructed socket. Anyway, the source is your final friend... >>> >>> Cheers, >>> Gonzalo >>> >>> >>> On Mon, Mar 16, 2015 at 10:52 PM, Garrett D'Amore <garrett@xxxxxxxxxx> >>> wrote: >>> >>>> >>>> > On Mar 16, 2015, at 2:45 PM, Benoit Labaere <benoit.labaere@xxxxxxxxx> >>>> wrote: >>>> > >>>> > Putting a device between pub and sub sockets seems to require the sub >>>> socket of the device to be subscribed to something, an empty string for >>>> example. >>>> > Is this the intended behavior, or did I miss some step ? >>>> >>>> I thought by default sub sockets were subscribed to everything. But >>>> subscribing to an empty string should have that effect as well. :-) >>>> >>>> - Garrett >>>> >>>> >>>> >>> >>> >>> -- >>> Gonzalo Diethelm >>> gonzalo.diethelm@xxxxxxxxx >>> >> >> > > > -- > Gonzalo Diethelm > gonzalo.diethelm@xxxxxxxxx >