Ejemplo n.º 1
0
 /// <summary>
 /// Leaves a tournament.
 /// </summary>
 /// <param name="id">The tournament identifier.</param>
 public void LeaveTournament(string id)
 {
     if (tournamentCons.TryRemove(id, out LilaTournament t))
     {
         t.Dispose();
         if (!lobbyCon.IsConnected())
         {
             lobbyCon.Reconnect();
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Called when the tournament socket disconnects.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The e.</param>
 private void OnDisconnect(object sender, SocketDisconnectArgs e)
 {
     log.ConditionalDebug("Disconnected from /tournament/{0}", tournamentData.Id);
     if (socket != null && !e.Initiated && e.ReconnectionAttempts < Client.Settings.ReconnectionAttemptLimit)
     {
         log.ConditionalDebug("Reconnecting /tournament/{0}", tournamentData.Id);
         socket.Reconnect();
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Called when challenge socket is disconnected.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The e.</param>
 private void OnChallengeDisconnect(object sender, SocketDisconnectArgs e)
 {
     log.ConditionalDebug("Disconnected from challenge socket.");
     if (challengeCon != null && !_disposing && !e.Initiated && e.ReconnectionAttempts < Settings.ReconnectionAttemptLimit)
     {
         log.ConditionalDebug("Reconnecting challenge socket.");
         challengeCon.Reconnect();
     }
 }