Пример #1
0
        public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
        {
            //消息接受者类型
            string strReciverType = context.Request.QueryString["recivertype"];
            //消息接受者ID
            int    intReciverID = context.Request.QueryString["reciverid"] == null ? 0 : int.Parse(context.Request.QueryString["reciverid"].ToString());
            string currKey      = strReciverType + "-" + intReciverID.ToString();

            CometResult asynch = new CometResult(context, cb, extraData);

            CometMgr.Instance().Clients.Add(asynch);
            return(asynch);
        }
Пример #2
0
 public void EndProcessRequest(IAsyncResult result)
 {
     CometMgr.Instance().Clients.Remove((CometResult)result);//从列表中删除
 }