- Notifications
You must be signed in to change notification settings - Fork80
Open
Description
Can we add a function to publish messages in one call like this
int MqttClient::publish(const char* topic, const char *payload, bool retain = false, uint8_t qos = 0, bool dup = false);int MqttClient::publish(const char *topic, const char *payload, bool retain, uint8_t qos, bool dup) { int ret = beginMessage(topic, strlen_P(payload), retain, qos, dup); if (!ret) { return ret; } print(payload); ret = endMessage(); return ret;}(and corresponding functions using Strings)
This would make porting from other MQTT libs easier and save lines of code.
If approved I can do a PR.