connect method
Function to define another connection without call directly the connection function
Implementation
FutureOr<WebSocketChannel> connect(
{required Uri uri,
Iterable<String>? protocols,
Map<String, dynamic>? headers}) {
if (connectFn != null) {
return connectFn!(uri, protocols);
}
return defaultConnectPlatform(
uri,
protocols,
headers: headers ?? this.headers,
);
}