/// <summary> /// 完成长连接处理 /// </summary> public void FinishCometRequest(ICometRequest request) { if (request.IsCompeled||(DateTime.Now - request.BeginTime).TotalSeconds >= RequestTimeOut) { DeQueueCometRequest(request); request.FinishCometRequest(); } }
/// <summary> /// 立即处理请求(返回时候得到处理) /// </summary> void HandleCurrentRequest(ICometRequest request) { lock (MessageSyncRoot) { //处理一个请求,不对MessageList copy了 SessionManager.DoChatSession(request,CometChatMessage ,null ); if(request.IsCompeled) { request.FinishCometRequest(); } } }