Example #1
0
        public HttpServer(HttpConnectionCallback callback, IOLoop ioloop)
        {
            this.callback = callback;
            this.ioloop = ioloop;

            AppHost.AddTimeout (TimeSpan.FromMinutes (2), RepeatBehavior.Forever, null, ExpireTransactions);
        }
Example #2
0
        public IOStream(Socket socket, IOLoop ioloop)
        {
            this.socket = socket;
            this.ioloop = ioloop;

            ReadChunkSize = DefaultReadChunkSize;

            socket.Blocking = false;

            read_watcher = new IOWatcher (socket.Handle, EventTypes.Read, ioloop.EventLoop, HandleIORead);
            write_watcher = new IOWatcher (socket.Handle, EventTypes.Write, ioloop.EventLoop, HandleIOWrite);
        }
Example #3
0
        public IOStream(Socket socket, IOLoop ioloop)
        {
            this.socket = socket;
            this.ioloop = ioloop;

            ReadChunkSize = DefaultReadChunkSize;

            socket.Blocking = false;

            state = IOLoop.EPOLL_ERROR_EVENTS;
            ioloop.AddHandler (socket.Handle, HandleEvents, state);
        }
Example #4
0
        public IOStream(Socket socket, IOLoop ioloop)
        {
            this.socket = socket;
            this.ioloop = ioloop;

            TimeOut = TimeSpan.FromMinutes (2);
            Expires = DateTime.UtcNow + TimeOut;

            ReadChunkSize = DefaultReadChunkSize;

            socket.Blocking = false;

            read_watcher = new IOWatcher (socket.Handle, EventTypes.Read, ioloop.EventLoop, HandleIORead);
            write_watcher = new IOWatcher (socket.Handle, EventTypes.Write, ioloop.EventLoop, HandleIOWrite);
        }
Example #5
0
 public HttpServer(HttpConnectionCallback callback, IOLoop ioloop)
 {
     this.callback = callback;
     this.ioloop = ioloop;
 }