Skip to content

Commit

Permalink
docs(readme): specify the Client as an event emitter to improve under…
Browse files Browse the repository at this point in the history
…standability (#1679)
  • Loading branch information
dkdk225 authored Aug 28, 2023
1 parent 844e4ff commit 57f4595
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ Async [`connect`](#connect). Returns a `Promise` that resolves to a `mqtt.Client

The `Client` class wraps a client connection to an
MQTT broker over an arbitrary transport method (TCP, TLS,
WebSocket, ecc).
WebSocket, ecc).
`Client` is an [EventEmitter](https://nodejs.dev/en/learn/the-nodejs-event-emitter/) that has it's own [events](#events)

`Client` automatically handles the following:

Expand Down Expand Up @@ -446,6 +447,8 @@ If you are connecting to a broker that supports only MQTT 3.1 (not
This is confirmed on RabbitMQ 3.2.4, and on Mosquitto < 1.3. Mosquitto
version 1.3 and 1.4 works fine without those.

<a name="events"></a>

#### Event `'connect'`

`function (connack) {}`
Expand Down

0 comments on commit 57f4595

Please sign in to comment.