Esempio n. 1
0
        /// <summary>
        /// 完成长连接处理
        /// </summary>
        public void FinishCometRequest(ICometRequest request)
        {
            if (request.IsCompeled||(DateTime.Now - request.BeginTime).TotalSeconds >= RequestTimeOut)
            {
                DeQueueCometRequest(request);

                request.FinishCometRequest();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 立即处理请求(返回时候得到处理)
 /// </summary>
 void HandleCurrentRequest(ICometRequest request)
 {
     lock (MessageSyncRoot)
     {
         //处理一个请求,不对MessageList copy了
         SessionManager.DoChatSession(request,CometChatMessage ,null );
       if(request.IsCompeled)
       {
             request.FinishCometRequest();
         }
     }
 }