npm-networking/test
Fabian @ Blax Software d0a8f46d80 feat(ws): opt-in send timeout, per call or client-wide (0.3.3)
send() waited forever when the server never answered. In apps that awaited
a read during page setup, a dropped response left the old layout on screen
with an empty body until a reload.

- sendTimeout (ms, default 0 = off): reject unanswered sends with
  { message, code: 'timeout' }. The clock starts at the call, so a send
  stuck behind the connect or channel subscribe times out too.
- send(event, data, channel, { timeout, progress }): per-call override;
  a bare function as 4th argument still means progress. timeout 0 opts out.
- A send that timed out before it was written is dropped from the queue
  instead of going out late after a reconnect.
- Protocol events (websocket.*) never time out.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 14:42:03 +02:00
..
ws.test.mjs feat(ws): opt-in send timeout, per call or client-wide (0.3.3) 2026-09-28 14:42:03 +02:00