liblwmqtt : How to read messages on subscribed topics?

Asked by dpux

Hi,
Just had a look at this mqtt client : http://code.google.com/p/liblwmqtt/source/browse/

I am able to publish and subscribe for topics using mosquitto broker (http://code.google.com/p/liblwmqtt/source/browse/trunk/test/test.c ) - but I cant understand how to read a message if it comes on the subscribed topic ? Can someone please guide me on this ?

Thanks !

Question information

Language:
English Edit question
Status:
Solved
For:
mosquitto Edit question
Assignee:
No assignee Edit question
Solved by:
Roger Light
Solved:
Last query:
Last reply:
Revision history for this message
Best Roger Light (roger.light) said :
#1

I think that client is incomplete. If you note the commit message it says "no socket reads at all". It can only write data, not read it. This limits the usefulness of the library significantly :)

Have you tried using libmosquitto, the client library that is provided with mosquitto?

Regards,

Roger

Revision history for this message
dpux (dux-deepak) said :
#2

Oh thanks Roger...I ignored that comment, delighted at something too simple to start with :)
Giving libmosquitto a try...sure it seems far better.

Thanks !

Revision history for this message
dpux (dux-deepak) said :
#3

Thanks Roger Light, that solved my question.