dart_frog_web_socket library

WebSocket support for package:dart_frog

Classes

WebSocketChannel
A StreamChannel that communicates over a WebSocket.
WebSocketSink
The sink exposed by a WebSocketChannel.

Functions

webSocketHandler(void onConnection(WebSocketChannel channel, String? protocol), {Iterable<String>? protocols, Iterable<String>? allowedOrigins, Duration? pingInterval}) → Handler
Creates a Dart Frog Handler that upgrades HTTP requests to WebSocket connections.

Exceptions / Errors

WebSocketChannelException
An exception thrown by a WebSocketChannel.