Hi Tim, The example in the libmosquitto man page tends to get forgotten, I'll fix it up - thanks for the reminder. As the others said, client/sub_client.c exists but may be over complicated as a first example because it is a general tool. There is the examples/ directory, but I notice that could do with some love as well.
Cheers, Roger On Thu, Dec 5, 2013 at 4:04 PM, Tim Champion <t...@slashwebstudios.com> wrote: > Hi, I'm looking for a working example subscriber in C. I have working code > that can publish in C, and I can subscribe on the command line, and that > works. > > What I can't find is an example C program that does something simple like > receive messages and spit them back out to the screen. My program will add > the message payload to a work queue, but that's not the problem I'm having. > > I tried the code at the bottom of this page: > http://mosquitto.org/man/libmosquitto-3.html but it doesn't seem to work. > > mosquitto_lib_version returns 1.2.2 if that helps. > > Tim Champion > t...@slashwebstudios.com > > -- > Mailing list: https://launchpad.net/~mosquitto-users > Post to : mosquitto-users@lists.launchpad.net > Unsubscribe : https://launchpad.net/~mosquitto-users > More help : https://help.launchpad.net/ListHelp > -- Mailing list: https://launchpad.net/~mosquitto-users Post to : mosquitto-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~mosquitto-users More help : https://help.launchpad.net/ListHelp