Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 697 Bytes

RFC-0011-Standard-Library-WebSocket.md

File metadata and controls

25 lines (20 loc) · 697 Bytes

RFC-0011: Standard-Library-WebSocket

Status: Draft v0.1
Author: Raccoon Core Team
Date: 2025-10-05

Summary

@raccoon/std/WebSocket await-less API, backpressure, heartbeat, typed messages.

API

function upgrade(path, handler, cfg?): Router
class Socket {
  send(msg): Result<void, Error>
  recv(opts?): Result<Message, Error>
  close(code?, reason?): Result<void, Error>
  sendText(s): Result<void, Error>; sendBinary(b): Result<void, Error>; isOpen(): boolean
}

Config

recvBuffer, sendBuffer, idleTimeoutMs, maxMessageSize, heartbeatMs.

Lints

WS_UNAUTHENTICATED, WS_UNTYPED_MESSAGE, WS_UNBOUNDED_BROADCAST, WS_IDLE_TIMEOUT_DISABLED.