upgrade method

Future<WebSocket> upgrade({
  1. dynamic protocolSelector(
    1. List<String>
    )?,
  2. CompressionOptions compression = CompressionOptions.compressionDefault,
})

Upgrades a HttpRequest to a WebSocket connection

Implementation

Future<WebSocket> upgrade({
  Function(List<String>)? protocolSelector,
  CompressionOptions compression = CompressionOptions.compressionDefault,
}) async =>
    await WebSocketTransformer.upgrade(
      _httpRequest,
      protocolSelector: protocolSelector,
      compression: compression,
    );