Example #1
0
        /// <summary>
        /// original HttpHandler code - AMP pattern
        /// </summary>
        /// <param name="context"></param>
        /// <param name="callback"></param>
        /// <param name="asyncState"></param>
        /// <returns></returns>
        public IAsyncResult BeginProcessRequest(HttpContext context, AsyncCallback callback, object asyncState)
        {
            Message[]        request     = MessageConverter.FromJson(context.Request);
            CometAsyncResult asyncResult = new CometAsyncResult(context, callback, asyncState);

            msgBus.HandleMessages(request, asyncResult);
            return(asyncResult);
        }