← Back to team overview

mosquitto-users team mailing list archive

example subscriber in C

 

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

Follow ups