mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
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
7 lines
131 B
TypeScript
7 lines
131 B
TypeScript
import "./url";
|
|
import "./connection";
|
|
import "./socket";
|
|
import "./node";
|
|
import "./connection-state-recovery";
|
|
import "./retry";
|