public void HandleExitOperation(GamePeer peer, OperationRequest operationRequest, SendParameters sendParameters) { var exitRequest = new ExitRequest(peer.Protocol, operationRequest); if (!peer.ValidateOperation(exitRequest, sendParameters)) { return; } var room = FindPeerRoom(peer); if (room != null) { room.ExecutionFiber.Enqueue(() => room.Leave(peer)); } peer.Leave(); }
public void HandleDisconnect(GamePeer peer) { peer.Leave(); }