public void CloseGame(string connectionId) { var user = CurrentConnections.FirstOrDefault(x => x.ConnectionId == connectionId); CurrentConnections.Remove(user); Clients.Caller.leaveGame(); }
/// <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); }