docs: function ThaliWifiInfrastructure() {
    this._isStarted = false;
  
    // Represent target states (the state after promise queue is completed)
    this._targetState = {
      started: false,
      advertising: false,
      listening: false
    };
    this._promiseQueue = new PromiseQueue();
    this._lastNetworkStatus = null;
  
    var advertiser = new WifiAdvertiser();
    var listener = new WifiListener();
  
    // make listener ignore advertiser's messages
    listener.setMessageFilter(function (data) {
      var ignorePeers = advertiser.getAdvertisedPeerIdentifiers();
      var peer = USN.tryParse(data.USN, null);
      return (peer !== null) && (ignorePeers.indexOf(peer.peerIdentifier) === -1);
    });
  
    this.advertiser = advertiser;
    this.listener = listener;
  
    this.peerAvailabilities = {
      watchers: {},
      timers: {}
    };
    this._setUpEvents();
  }