示例#1
0
        public void CloseGame(string connectionId)
        {
            var user = CurrentConnections.FirstOrDefault(x => x.ConnectionId == connectionId);

            CurrentConnections.Remove(user);

            Clients.Caller.leaveGame();
        }
示例#2
0
 /// <summary>
 /// Event which invoke when server receive new response from other world
 /// </summary>
 private void Connection_OnDisconnected(Connection sender, ReceivedPacketEventsArgs e)
 {
     CloseConnection(sender);
     CurrentConnections.Remove(sender);
 }