Esempio n. 1
0
 public HttpServer(Context context, HttpConnectionCallback callback, Socket socket, bool closeOnEnd = false)
 {
     this.callback = callback;
     this.socket = socket;
     this.closeOnEnd = closeOnEnd;
     this.Context = context;
 }
Esempio n. 2
0
 public HttpServer(IOLoop loop, HttpConnectionCallback callback, Socket socket, bool closeOnEnd = false)
 {
     this.callback   = callback;
     this.socket     = socket;
     this.closeOnEnd = closeOnEnd;
     this.IOLoop     = loop;
 }
Esempio n. 3
0
 public HttpServer(Context context, HttpConnectionCallback callback, ITcpServerSocket socket, bool closeOnEnd = false)
 {
     this.callback   = callback;
     this.socket     = socket;
     this.closeOnEnd = closeOnEnd;
     this.Context    = context;
 }
Esempio n. 4
0
        public HttpServer(HttpConnectionCallback callback, IOLoop ioloop)
        {
            this.callback = callback;
            this.ioloop = ioloop;

            AppHost.AddTimeout (TimeSpan.FromMinutes (2), RepeatBehavior.Forever, null, ExpireTransactions);
        }
Esempio n. 5
0
        public HttpTransaction(HttpServer server, IOStream stream, Socket socket, HttpConnectionCallback callback)
        {
            Server = server;
            IOStream = stream;
            Socket = socket;
            ConnectionCallback = callback;

            write_ops = new Queue<IWriteOperation> ();

            stream.ReadUntil ("\r\n\r\n", OnHeaders);
        }
Esempio n. 6
0
        public HttpTransaction(HttpServer server, Socket socket, HttpConnectionCallback callback, bool closeOnEnd = false)
        {
            Server = server;
            Socket = socket;
            this.closeOnEnd = closeOnEnd;

            ConnectionCallback = callback;

            gc_handle = GCHandle.Alloc (this);

            Request = new HttpRequest (this, socket);
            Request.Read (Close);
        }
Esempio n. 7
0
        public HttpTransaction(HttpServer server, Socket socket, HttpConnectionCallback callback, bool closeOnEnd = false)
        {
            Server          = server;
            Socket          = socket;
            this.closeOnEnd = closeOnEnd;

            ConnectionCallback = callback;

            gc_handle = GCHandle.Alloc(this);

            Request = new HttpRequest(this, socket);
            Request.Read(Close);
        }
Esempio n. 8
0
        public HttpTransaction(HttpServer server, IOStream stream, Socket socket, HttpConnectionCallback callback)
        {
            Server = server;
            IOStream = stream;
            Socket = socket;
            ConnectionCallback = callback;

            stream.OnClose (OnClose);

            parser_settings = CreateParserSettings ();
            parser = new HttpParser ();

            stream.ReadBytes (OnBytesRead);
        }
Esempio n. 9
0
        public HttpTransaction(HttpServer server, SocketStream stream, HttpConnectionCallback callback)
        {
            Server = server;
            Stream = stream;

            ConnectionCallback = callback;

            gc_handle = GCHandle.Alloc (this);

            Stream.Closed += delegate (object sender, EventArgs args) {
                Close ();
            };

            Request = new HttpRequest (this, stream);
            Request.Read ();
        }
Esempio n. 10
0
        public HttpTransaction(HttpServer server, SocketStream stream, HttpConnectionCallback callback)
        {
            Server = server;
            Stream = stream;

            ConnectionCallback = callback;

            gc_handle = GCHandle.Alloc(this);

            Stream.Closed += delegate(object sender, EventArgs args) {
                Close();
            };

            Request = new HttpRequest(this, stream);
            Request.Read();
        }
Esempio n. 11
0
        public static HttpTransaction BeginTransaction(HttpServer server, ISocketStream stream, HttpConnectionCallback cb, bool closeOnEnd = false)
        {
            HttpTransaction transaction = new HttpTransaction (server, stream, cb, closeOnEnd);

            return transaction;
        }
Esempio n. 12
0
        public static HttpTransaction BeginTransaction(HttpServer server, SocketStream stream, HttpConnectionCallback cb)
        {
            HttpTransaction transaction = new HttpTransaction (server, stream, cb);

            return transaction;
        }
Esempio n. 13
0
 public HttpServer(HttpConnectionCallback callback, ISocketStream socket, bool closeOnEnd = false)
 {
     this.callback   = callback;
     this.socket     = socket;
     this.closeOnEnd = closeOnEnd;
 }
Esempio n. 14
0
 public static void BeginTransaction(HttpServer server, IOStream stream, Socket socket, HttpConnectionCallback cb)
 {
     HttpTransaction transaction = new HttpTransaction (server, stream, socket, cb);
 }
Esempio n. 15
0
 public HttpServer(HttpConnectionCallback callback, IOLoop ioloop)
 {
     this.callback = callback;
     this.ioloop = ioloop;
 }
Esempio n. 16
0
        public static HttpTransaction BeginTransaction(HttpServer server, Socket socket, HttpConnectionCallback cb, bool closeOnEnd = false)
        {
            HttpTransaction transaction = new HttpTransaction(server, socket, cb, closeOnEnd);

            return(transaction);
        }
Esempio n. 17
0
 public HttpServer(HttpConnectionCallback callback, IOLoop ioloop, bool closeOnEnd = false )
 {
     this.callback = callback;
     this.ioloop = ioloop;
     this.closeOnEnd = closeOnEnd;
 }
Esempio n. 18
0
 public HttpServer(HttpConnectionCallback callback, ISocketStream socket, bool closeOnEnd = false)
 {
     this.callback = callback;
     this.socket = socket;
     this.closeOnEnd = closeOnEnd;
 }
Esempio n. 19
0
        public static HttpTransaction BeginTransaction(HttpServer server, ITcpSocket socket, HttpConnectionCallback cb,
                                                       bool closeOnEnd = false)
        {
            var transaction = new HttpTransaction(server, socket, cb, closeOnEnd);

            return transaction;
        }
Esempio n. 20
0
 public HttpServer(HttpConnectionCallback callback, IOLoop ioloop)
 {
     this.callback = callback;
     this.ioloop   = ioloop;
 }
Esempio n. 21
0
        public static HttpTransaction BeginTransaction(HttpServer server, SocketStream stream, HttpConnectionCallback cb)
        {
            HttpTransaction transaction = new HttpTransaction(server, stream, cb);

            return(transaction);
        }
Esempio n. 22
0
 public HttpServer(HttpConnectionCallback callback, IOLoop ioloop, bool closeOnEnd = false)
 {
     this.callback   = callback;
     this.ioloop     = ioloop;
     this.closeOnEnd = closeOnEnd;
 }