connect static method
Connects to endpoint.
headers are sent with the upgrade request, for a server that
authenticates there rather than in the query string.
Implementation
static Future<SocketLink> connect(
Uri endpoint, {
Map<String, Object>? headers,
}) async => WebSocketLink._(
await WebSocket.connect(endpoint.toString(), headers: headers),
);