public void DestroyPeer(Case42Peer peer) { //remove it from lobby Registry.Get<LobbyComponent>(lobby => { if (lobby.Contains(peer)) lobby.Leave(peer); }); //remove it from the network session but not lobby _peers.Remove(peer); }
protected override PeerBase CreatePeer(InitRequest initRequest) { //log.InfoFormat("Peer created at {0}:{1}", initRequest.RemoteIP, initRequest.RemotePort); //return new Case42Peer(initRequest); var peer = new Case42Peer(this, initRequest); _peers.Add(peer); return peer; }