Пример #1
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);
        }
Пример #2
0
 public static void BeginTransaction(HttpServer server, IOStream stream, Socket socket, HttpConnectionCallback cb)
 {
     HttpTransaction transaction = new HttpTransaction (server, stream, socket, cb);
 }
Пример #3
0
        public static void Start(ManosApp application)
        {
            if (application == null)
                throw new ArgumentNullException ("application");

            app = application;

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

            IPEndPoint endpoint = new IPEndPoint (IPAddress, port);

            Server.Bind (endpoint);

            server.Start ();
            ioloop.Start ();
        }