public void SelectItem(PeerItem item)
 {
     SelectedItem?.peer.Disconnect(nameof(SignaledPeer.BufferedOfferUpdated), this, nameof(UpdateOutput));
     SelectedItem = item;
     SelectedItem.peer.Connect(nameof(SignaledPeer.BufferedOfferUpdated), this, nameof(UpdateOutput));
     if (SelectedItem.peer.BufferedOffer != null)
     {
         UpdateOutput(SelectedItem.peer.BufferedOffer);
     }
 }
    public void OnPeerAdded(SignaledPeer peer)
    {
        PackedScene scene    = GD.Load <PackedScene>("res://addons/PurePeerSignaling/PeerItem.tscn");
        PeerItem    peerItem = (PeerItem)scene.Instance();

        PeerList.AddChild(peerItem);
        peerItem.Init(peer, this);
        if (peer.CurrentState == SignaledPeer.ConnectionStateMachine.MANUAL)
        {
            SelectItem(peerItem);
            Log.Information("manual peer selected; {UID}", peer.UID);
        }
    }