SolanaMobileWebSocketConnection constructor

SolanaMobileWebSocketConnection({
  1. int? maxAttempts,
  2. List<int>? backoffSchedule = const [],
  3. Iterable<String>? protocols,
})

An abstraction over a SolanaMobileWebSocket to map web socket requests to their responses.

Implementation

SolanaMobileWebSocketConnection({
  final int? maxAttempts,
  final List<int>? backoffSchedule = const [],
  final Iterable<String>? protocols,
}) {
  socket = SolanaMobileWebSocket(
    maxAttempts: maxAttempts,
    backoffSchedule: backoffSchedule,
    protocols: protocols,
  )..listen(
      onConnect: _onWebSocketConnect,
    );
}