BroadcastState constructor

BroadcastState()

creates a new BroadcastState instance

Implementation

BroadcastState() {
  _networkSubscription = networkController.stream.listen((response) {
    // got a response from a relay
    broadcasts[response.relayUrl] = response;
    // send state update
    _stateUpdatesController.add(this);
    // check if all relays responded
    _checkBroadcastDone();
  });
}