Skip to content

Commit 196556b

Browse files
committed
updated docs
1 parent bb51a65 commit 196556b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ void onMessageAdvanced(MQTTClientCallbackAdvanced);
149149
Set more advanced options:
150150
151151
```c++
152+
void setKeepAlive(int keepAlive);
153+
void setCleanSession(bool cleanSession);
154+
void setTimeout(int timeout);
152155
void setOptions(int keepAlive, bool cleanSession, int timeout);
153156
```
154157

@@ -174,7 +177,7 @@ bool connect(const char clientId[], const char username[], const char password[]
174177
```
175178

176179
- If the `skip` option is set to true, the client will skip the network level connection and jump to the MQTT level connection. This option can be used in order to establish and verify TLS connections manually before giving control to the MQTT client.
177-
- This functions returns a boolean that indicates if the connection has been established successfully.
180+
- The functions return a boolean that indicates if the connection has been established successfully (true).
178181

179182
Publishes a message to the broker with an optional payload:
180183

@@ -191,6 +194,8 @@ bool publish(const char topic[], const char payload[], int length);
191194
bool publish(const char topic[], const char payload[], int length, bool retained, int qos);
192195
```
193196
197+
- The functions return a boolean that indicates if the publish has been successful (true).
198+
194199
Subscribe to a topic:
195200
196201
```c++
@@ -200,20 +205,25 @@ bool subscribe(const char topic[]);
200205
bool subscribe(const char topic[], int qos);
201206
```
202207

208+
- The functions return a boolean that indicates if the subscribe has been successful (true).
209+
203210
Unsubscribe from a topic:
204211

205212
```c++
206213
bool unsubscribe(const String &topic);
207214
bool unsubscribe(const char topic[]);
208215
```
209216
217+
- The functions return a boolean that indicates if the unsubscribe has been successful (true).
218+
210219
Sends and receives packets:
211220
212221
```c++
213222
bool loop();
214223
```
215224

216225
- This function should be called in every `loop`.
226+
- The function returns a boolean that indicates if the loop has been successful (true).
217227

218228
Check if the client is currently connected:
219229

@@ -237,6 +247,8 @@ Disconnect from the broker:
237247
bool disconnect();
238248
```
239249

250+
- The function returns a boolean that indicates if the disconnect has been successful (true).
251+
240252
## Release Management
241253

242254
- Update version in `library.properties`.

0 commit comments

Comments
 (0)