Files
socket.io/test/index.ts
Damien Arrachequesne 655dce9755 feat: implement retry mechanism
Syntax:

```js
const socket = io({
  retries: 3,
  ackTimeout: 10000
});

// "my-event" will be sent up to 4 times (1 + 3), until the server sends an acknowledgement
socket.emit("my-event", (err) => {});
```

Notes:

- the order of the packets is guaranteed, as we send packets one by one
- the same packet id is reused for consecutive retries, in order to
allow deduplication on the server side
2023-02-01 08:19:34 +01:00

7 lines
131 B
TypeScript

import "./url";
import "./connection";
import "./socket";
import "./node";
import "./connection-state-recovery";
import "./retry";