io library

dart:io-only helpers for rpc_dart_websocket.

Kept out of the main library on purpose: rpc_dart_websocket.dart is web-safe (the package has a browser smoke test) and importing dart:io there would break that. Anything here needs a real socket and a real server, so it only makes sense on the VM.

Functions

rpcWebSocketConnections(HttpServer server, {Duration? pingInterval = const Duration(seconds: 30), dynamic protocolSelector(List<String> protocols)?, CompressionOptions compression = CompressionOptions.compressionOff, Set<String>? allowedOrigins, bool allowUpgrade(HttpRequest request)?}) → Stream<WebSocketChannel>
Turns an HttpServer into the Stream<WebSocketChannel> that RpcWebSocketServer consumes, applying server-side keepalive.