Arham-Begani commented on code in PR #4552:
URL: https://github.com/apache/iggy/pull/4552#discussion_r4285149913


##########
foreign/node/README.md:
##########
@@ -128,6 +128,31 @@ const client = new Client({
 const stats = await client.system.getStats();
 ```
 
+### Connection events
+
+`Client` reports its connection lifecycle through Node.js-style `on`, `once`
+and `off` methods. Each method returns the client, so calls can be chained.
+
+```ts
+client
+  .on("connecting", () => console.log("dialing the server"))
+  .once("connected", () => console.log("connected"))
+  .on("error", (error) => console.error("connection error", error))
+  .on("end", () => console.log("client destroyed"));
+```
+
+- `connecting` fires once for each dial: the first one, each redial after

Review Comment:
   Done in b79775b



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to