← Back to team overview

mosquitto-users team mailing list archive

Re: example subscriber in C

 

Hi,

When you download the source code on the mosquitto site, there is a working
publisher and subscriber in the client subfolder. Both written in C.

Hope that helps!

Greetings,
Sven


2013/12/5 Tim Champion <tim@xxxxxxxxxxxxxxxxxxx>

> 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
> tim@xxxxxxxxxxxxxxxxxxx
>
> --
> Mailing list: https://launchpad.net/~mosquitto-users
> Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~mosquitto-users
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References