//-------------------------------------------------------------------------------------------- public IAsyncResult BeginProcessRequest(HttpContext context, System.AsyncCallback cb, object extraData) { _context = context; context.Response.Cache.SetCacheability(HttpCacheability.NoCache); context.Response.Write("bufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbuffer</message>"); context.Response.Flush(); // object data = context.Request["position"]; example for getting the query string HttpStreamThreadResult result = new HttpStreamThreadResult(context, cb, null); HttpStreamThread request = new HttpStreamThread(result); ThreadStart start = new ThreadStart(request.Process); Thread workerThread = new Thread(start); workerThread.Start(); // Return the AsynResult to ASP.NET return result; }
//-------------------------------------------------------------------------------------------- public IAsyncResult BeginProcessRequest(HttpContext context, System.AsyncCallback cb, object extraData) { _context = context; context.Response.Cache.SetCacheability(HttpCacheability.NoCache); context.Response.Write("bufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbufferfillerbuffer</message>"); context.Response.Flush(); // object data = context.Request["position"]; example for getting the query string HttpStreamThreadResult result = new HttpStreamThreadResult(context, cb, null); HttpStreamThread request = new HttpStreamThread(result); ThreadStart start = new ThreadStart(request.Process); Thread workerThread = new Thread(start); workerThread.Start(); // Return the AsynResult to ASP.NET return(result); }