newWebSocket method

  1. @override
Future<WebSocket> newWebSocket(
  1. Uri uri, {
  2. Map<String, dynamic>? headers,
  3. Iterable<String>? protocols,
})
override

Construct a WebSocket instance for use in the browser.

Implementation

@override
Future<WebSocket> newWebSocket(Uri uri,
        {Map<String, dynamic>? headers, Iterable<String>? protocols}) =>
    BrowserWebSocket.connect(uri, headers: headers, protocols: protocols);