ThrottleWebSocketChannel constructor
ThrottleWebSocketChannel(
- WebSocketChannel inner, {
- required ThrottleController controller,
- Uri? url,
Wraps inner, throttling it through controller.
url is used for rule matching and log display; if omitted a placeholder
ws://websocket URI is used.
Implementation
ThrottleWebSocketChannel(this.inner, {required this.controller, Uri? url})
: _url = url ?? Uri.parse('ws://websocket') {
_stream = _wrapIncoming(inner.stream);
_sink = _ThrottledWebSocketSink(inner.sink, controller.engine, _url);
}