Example #1
0
        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();
        }
Example #2
0
 public void HandleDisconnect(GamePeer peer)
 {
     peer.Leave();
 }
Example #3
0
        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();
        }
Example #4
0
 public void HandleDisconnect(GamePeer peer)
 {
     peer.Leave();
 }