connect static method
Creates a new WebSocket connection.
Connects to uri using and returns a channel that can be used to
communicate over the resulting socket.
The optional protocols parameter is the same as WebSocket.connect.
Implementation
static Future<WebSocketChannel> connect(Uri uri,
{Iterable<String>? protocols, Duration? connectTimeout}) async =>
await platform.connect(
uri,
protocols: protocols,
connectTimeout: connectTimeout,
);