Skip to content

Commit f1f6541

Browse files
committed
feat: bump version
1 parent 6be27aa commit f1f6541

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/pages/providers/ws.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface GetWsProvider {
1717
onStatusChanged: (status: StatusChange) => void
1818
innerEnhancer: (input: JsonRpcProvider) => JsonRpcProvider
1919
timeout: number
20+
heartbeatTimeout: number
2021
websocketClass: WebSocketClass
2122
}>,
2223
): WsJsonRpcProvider
@@ -87,6 +88,12 @@ class WSForPapi extends WebSocket {
8788
const provider = getWsProvider("wss://myws.com", { websocketClass: WSForPapi })
8889
```
8990

91+
## Heartbeat
92+
93+
The provider will try to figure out if the ws connection became stale, and it needs to be closed and reopened to continue working.
94+
95+
PAPI uses the heartbeat feature to accomplish this purpose. You can customize the heartbeat timeout with `heartbeatTimeout` option (in milliseconds). Its default is `40_000`.
96+
9097
## Connection status
9198

9299
The provider also has a `getStatus` method that returns the current status of the connection. Let's see it:

vocs.config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig } from "vocs"
22

3-
const version = "1.19.0"
3+
const version = "1.20.0"
44

55
export default defineConfig({
66
title: "Polkadot-API",

0 commit comments

Comments
 (0)