newWebSocket method

  1. @override
Future<WebSocket> newWebSocket(
  1. Uri uri, {
  2. Map<String, dynamic>? headers,
  3. Iterable<String>? protocols,
  4. @Deprecated(v3Deprecation) bool? sockJSDebug,
  5. @Deprecated(v3Deprecation) bool? sockJSNoCredentials,
  6. @Deprecated(v3Deprecation) List<String>? sockJSProtocolsWhitelist,
  7. @Deprecated(v3Deprecation) Duration? sockJSTimeout,
  8. @Deprecated(v3Deprecation) bool? useSockJS,
})
override

Construct a WebSocket instance for use in the Dart VM.

Implementation

@override
Future<WebSocket> newWebSocket(Uri uri,
        {Map<String, dynamic>? headers,
        Iterable<String>? protocols,
        @Deprecated(v3Deprecation) bool? sockJSDebug,
        @Deprecated(v3Deprecation) bool? sockJSNoCredentials,
        @Deprecated(v3Deprecation) List<String>? sockJSProtocolsWhitelist,
        @Deprecated(v3Deprecation) Duration? sockJSTimeout,
        @Deprecated(v3Deprecation) bool? useSockJS}) =>
    VMWebSocket.connect(uri, headers: headers, protocols: protocols);