Fix payload content

This commit is contained in:
hsaturn
2021-03-22 02:33:54 +01:00
parent 0cb2e99b4b
commit 5cee67095e
2 changed files with 8 additions and 5 deletions

View File

@@ -57,7 +57,7 @@ class MqttMessage
MqttMessage(Type t) { create(t); }
void incoming(char byte);
void add(char byte) { incoming(byte); }
void add(const char* p, size_t len);
void add(const char* p, size_t len, bool addLength=true );
void add(const std::string& s) { add(s.c_str(), s.length()); }
void add(const Topic& t) { add(t.str()); }
const char* end() const { return &buffer[0]+buffer.size(); }