Skip to content

Commit a1ae6d3

Browse files
Rotzbua256dpi
authored andcommitted
docs: add constructor
1 parent 6d7d51e commit a1ae6d3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,17 @@ void loop() {
108108
109109
## API
110110
111+
Create the object with:
112+
113+
```c++
114+
MQTTClient()
115+
MQTTClient(int bufSize)
116+
MQTTClient(int readBufSize, int writeBufSize)
117+
```
118+
119+
- `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.
120+
- The `bufSize` option sets `readBufSize` and `writeBufSize` to the same value.
121+
111122
Initialize the object using the hostname of the broker, the brokers port (default: `1883`) and the underlying Client class for network transport:
112123

113124
```c++

0 commit comments

Comments
 (0)