0.13.2 • Published 6 months ago

@xmpp/reconnect v0.13.2

Weekly downloads
2,822
License
ISC
Repository
github
Last release
6 months ago

reconnect

Auto reconnect for @xmpp/client and @xmpp/component.

Included and enabled in @xmpp/component and @xmpp/client.

Supports Node.js and browsers.

Each reconnect will re-use the options provided to the entity start method.

delay property

Property to set/get the delay in milliseconds between connection closed and reconnecting.

Default is 1000.

reconnect.delay; // 1000
reconnect.delay = 2000;

reconnecting event

Emitted each time a re-connection is attempted.

reconnect.on("reconnecting", () => {
  console.log("reconnecting");
});

reconnected event

Emitted each time a re-connection succeed.

reconnect.on("reconnected", () => {
  console.log("reconnected");
});

error event

Emitted on entity each time a re-connection fails.

entity.on("error", (err) => {
  console.error(err);
});
0.13.2

6 months ago

0.13.1

3 years ago

0.13.0

4 years ago

0.12.1

4 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.0.1

9 years ago

0.0.0

9 years ago