Beispiel #1
0
//--------------------------------------------------------------------------------------------
        public void EndProcessRequest(IAsyncResult result)
        {
            HttpStreamThreadResult requestResult = result as HttpStreamThreadResult;

            _context.Response.Write("Server connection closed.</message>");
            _context.Response.Flush();
            // do any other clean up work
        }
Beispiel #2
0
        //--------------------------------------------------------------------------------------------
        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;
        }
Beispiel #3
0
//--------------------------------------------------------------------------------------------
        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);
        }
Beispiel #4
0
 //--------------------------------------------------------------------------------------------
 public HttpStreamThread(HttpStreamThreadResult ar)
 {
     this.result = ar;
 }
Beispiel #5
0
//--------------------------------------------------------------------------------------------
        public HttpStreamThread(HttpStreamThreadResult ar)
        {
            this.result = ar;
        }