Exemplo n.º 1
0
 public EioContext(Loop parent)
 {
     eioHandlerCb = EioHandler;
     outstanding  = new ConcurrentQueue <Action> ();
     pulse        = new AsyncWatcher(parent, eioHandlerCb);
     pulse.Start();
 }
Exemplo n.º 2
0
        public static void Start(ManosApp application)
        {
            if (application == null)
            {
                throw new ArgumentNullException("application");
            }

            app = application;

            app.StartInternal();

            started = true;

            foreach (var ep in listenEndPoints)
            {
                var server = new HttpServer(HandleTransaction, ioloop);
                server.Listen(ep.Address.ToString(), ep.Port);

                servers.Add(server);
            }

            syncBlockWatcher = new AsyncWatcher(IOLoop.EventLoop, HandleSynchronizationEvent);
            syncBlockWatcher.Start();

            ioloop.Start();
        }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
0
        public ManosTwitter(Context context, OAuthTokens oauthtokens, TaskScheduler scheduler)
        {
            Context = context;
            TaskScheduler = scheduler;
            OAuthTokens = oauthtokens;

            callbacks = new AsyncWatcher<Action>(Context, (callback) => {
                callback();
            });
            callbacks.Start();
        }
Exemplo n.º 5
0
        public static void Start(ManosApp application)
        {
            if (application == null)
            {
                throw new ArgumentNullException("application");
            }

            app = application;

            app.StartInternal();

            started = true;
            server  = new HttpServer(HandleTransaction, ioloop);

            server.Listen(IPAddress.ToString(), port);

            syncBlockWatcher = new AsyncWatcher(IOLoop.EventLoop, HandleSynchronizationEvent);
            syncBlockWatcher.Start();

            ioloop.Start();
        }
Exemplo n.º 6
0
 public HttpEntity()
 {
     end_watcher = new AsyncWatcher(IOLoop.Instance.EventLoop, HandleEnd);
     end_watcher.Start();
 }