示例#1
0
 public EioContext(Loop parent)
 {
     eioHandlerCb = EioHandler;
     outstanding = new ConcurrentQueue<Action> ();
     pulse = new AsyncWatcher (parent, eioHandlerCb);
     pulse.Start ();
 }
示例#2
0
        public Boundary( IOLoop loop, int maxWorkPerLoop )
        {
            asyncWatcher = new AsyncWatcher ((LibEvLoop)loop.EventLoop, ( l, w, et ) => ProcessWork());
            asyncWatcher.Start ();

            workQueue = new ConcurrentQueue<Action> ();
            this.maxWorkPerLoop = maxWorkPerLoop;
        }
示例#3
0
        public HttpResponse(IHttpTransaction transaction, IOStream stream)
        {
            Transaction = transaction;
            IOStream = stream;

            StatusCode = 200;

            WriteHeaders = true;

            Headers = new HttpHeaders ();
            Stream = new HttpResponseStream (this, IOStream);
            Stream.Chunked = (transaction.Request.MajorVersion > 0 && transaction.Request.MinorVersion > 0);

            end_watcher = new AsyncWatcher (IOLoop.Instance.EventLoop, OnEnd);
            end_watcher.Start ();
        }
示例#4
0
文件: HttpEntity.cs 项目: koush/manos
 public HttpEntity()
 {
     end_watcher = new AsyncWatcher (IOLoop.Instance.EventLoop, OnEnd);
     end_watcher.Start ();
 }