From a1ae6d343074f882bc2c9a39d0dc7f680a4c4e50 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Tue, 12 Mar 2024 23:35:50 +0100 Subject: [PATCH] docs: add constructor --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index ee7570b..a4a8ab9 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,17 @@ void loop() { ## API +Create the object with: + +```c++ +MQTTClient() +MQTTClient(int bufSize) +MQTTClient(int readBufSize, int writeBufSize) +``` + +- `MQTTClient` has two buffers. One for read and one for write. Default buffer size is 128 bytes. In summary are 256 bytes are used for buffers. +- The `bufSize` option sets `readBufSize` and `writeBufSize` to the same value. + Initialize the object using the hostname of the broker, the brokers port (default: `1883`) and the underlying Client class for network transport: ```c++