Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add apublish() function #113

Open
Labels
topic: codeRelated to content of the project itselftype: enhancementProposed improvement
@hmueller01

Description

@hmueller01

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp