Beispiel #1
0
 private void CheckForIdleCometWaitRequest(CometWaitRequest request, CometClient cometClient)
 {
     lock (state)
     {
         if (DateTime.Now.Subtract(request.DateDeactivated.Value).TotalSeconds >= cometClient.ConnectionIdleSeconds)
         {
             //  ok, this dude has timed out, so we remove it
             StateManager.KillIdleCometClient(cometClient.PrivateToken);
             //  and deque the request
             WaitRequests.Remove(request);
         }
     }
 }
Beispiel #2
0
        internal void DequeueCometWaitRequest(string privateToken)
        {
            lock (state)
            {
                for (int i = 0; i < WaitRequests.Count; i++)
                {
                    CometWaitRequest request = WaitRequests[i];

                    if (request.ClientPrivateToken == privateToken)
                    {
                        WaitRequests.Remove(request);
                        break;
                    }
                }
            }
        }