web_socket library
WebSocket adapter for flutter_network_throttler.
Import this entrypoint when you want to throttle a WebSocket connection:
import 'package:flutter_network_throttler/flutter_network_throttler.dart';
import 'package:flutter_network_throttler/web_socket.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
final raw = WebSocketChannel.connect(Uri.parse('wss://example.com/socket'));
final socket = ThrottleWebSocketChannel(raw, controller: controller);
Classes
- ThrottleWebSocketChannel
-
A
WebSocketChannelwrapper that applies a ThrottleController's profile to a WebSocket connection: the handshake, every inbound frame, and every outbound frame — and records them in the live log alongside HTTP traffic.