connect method

  1. @override
Future<void> connect(
  1. covariant IOAdapterRequest request,
  2. WebSocketCallback callback
)
override

Establishes a web-socket connection for the given AdapterRequest.

The provided callback will be invoked with a RelicWebSocket that allows sending and receiving messages the web-socket connection.

Implementation

@override
Future<void> connect(
  covariant final IOAdapterRequest request,
  final WebSocketCallback callback,
) async {
  callback(await IORelicWebSocket.fromHttpRequest(request._httpRequest));
}