hirotakaster / MQTT

MQTT for Photon, Spark Core
Other
217 stars 118 forks source link

Facilitate PublishOnly uses #79

Open Jeppedy opened 5 years ago

Jeppedy commented 5 years ago

When I'm using a "publish-only" device, no QoS, I don't believe I actually need to register a callback function. But, there's no signature to allow for that. It's not a big deal, but it's not clean... Can you make a constructor that does not require the callback, and will throw an exception if subscribe() is called...

hirotakaster commented 5 years ago

Simple publish-only case like this, please use callback-function is NULL. MQTT client("MQTT server", 1883, NULL);