
























@@ -550,19 +550,19 @@ enumeration of `src/gateway/server-methods/*.ts`.
550550The reference client in `src/gateway/client.ts` uses these defaults. Values are
551551stable across protocol v3 and are the expected baseline for third-party clients.
552552553-| Constant | Default | Source |
554-| ----------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------- |
555-| `PROTOCOL_VERSION` | `3` | `src/gateway/protocol/schema/protocol-schemas.ts` |
556-| Request timeout (per RPC) | `30_000` ms | `src/gateway/client.ts` (`requestTimeoutMs`) |
557-| Preauth / connect-challenge timeout | `15_000` ms | `src/gateway/handshake-timeouts.ts` (clamp `250`–`15_000`) |
558-| Initial reconnect backoff | `1_000` ms | `src/gateway/client.ts` (`backoffMs`) |
559-| Max reconnect backoff | `30_000` ms | `src/gateway/client.ts` (`scheduleReconnect`) |
560-| Fast-retry clamp after device-token close | `250` ms | `src/gateway/client.ts` |
561-| Force-stop grace before `terminate()` | `250` ms | `FORCE_STOP_TERMINATE_GRACE_MS` |
562-| `stopAndWait()` default timeout | `1_000` ms | `STOP_AND_WAIT_TIMEOUT_MS` |
563-| Default tick interval (pre `hello-ok`) | `30_000` ms | `src/gateway/client.ts` |
564-| Tick-timeout close | code `4000` when silence exceeds `tickIntervalMs * 2` | `src/gateway/client.ts` |
565-| `MAX_PAYLOAD_BYTES` | `25 * 1024 * 1024` (25 MB) | `src/gateway/server-constants.ts` |
553+| Constant | Default | Source |
554+| ----------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------ |
555+| `PROTOCOL_VERSION` | `3` | `src/gateway/protocol/schema/protocol-schemas.ts` |
556+| Request timeout (per RPC) | `30_000` ms | `src/gateway/client.ts` (`requestTimeoutMs`) |
557+| Preauth / connect-challenge timeout | `15_000` ms | `src/gateway/handshake-timeouts.ts` (config/env can raise the paired server/client budget) |
558+| Initial reconnect backoff | `1_000` ms | `src/gateway/client.ts` (`backoffMs`) |
559+| Max reconnect backoff | `30_000` ms | `src/gateway/client.ts` (`scheduleReconnect`) |
560+| Fast-retry clamp after device-token close | `250` ms | `src/gateway/client.ts` |
561+| Force-stop grace before `terminate()` | `250` ms | `FORCE_STOP_TERMINATE_GRACE_MS` |
562+| `stopAndWait()` default timeout | `1_000` ms | `STOP_AND_WAIT_TIMEOUT_MS` |
563+| Default tick interval (pre `hello-ok`) | `30_000` ms | `src/gateway/client.ts` |
564+| Tick-timeout close | code `4000` when silence exceeds `tickIntervalMs * 2` | `src/gateway/client.ts` |
565+| `MAX_PAYLOAD_BYTES` | `25 * 1024 * 1024` (25 MB) | `src/gateway/server-constants.ts` |
566566567567The server advertises the effective `policy.tickIntervalMs`, `policy.maxPayload`,
568568and `policy.maxBufferedBytes` in `hello-ok`; clients should honor those values
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。