WebSocketClientFake constructor

  1. @visibleForTesting
WebSocketClientFake({
  1. Iterable<String>? protocols,
})

Fake WebSocket client for testing purposes.

Implementation

@visibleForTesting
WebSocketClientFake({Iterable<String>? protocols})
    : protocols = protocols?.toList(),
      _controller = StreamController<Object>.broadcast(),
      _stateController = StreamController<WebSocketClientState>.broadcast(),
      _isClosed = false,
      _state = WebSocketClientState.initial();