예제 #1
0
        public FosRequest(Socket sock, Fos.Logging.IServerLogger logger)
            : base(sock)
        {
            Logger             = logger;
            CancellationSource = new CancellationTokenSource();
            OwinContext        = new OwinContext("1.0", CancellationSource.Token);

            // Streams
            stdout = new Fos.Streams.FosStdoutStream(sock);
            OwinContext.ResponseBody = Stdout;
            OwinContext.RequestBody  = Stdin;
        }
예제 #2
0
        public FosRequest(Socket sock, Fos.Logging.IServerLogger logger)
            : base(sock)
        {
            Logger             = logger;
            CancellationSource = new CancellationTokenSource();
            OwinContext        = new OwinContext("1.0", CancellationSource.Token);

            OwinContext.Add("server.OnSendingHeaders", (Action <Action <object>, object>)RegisterOnSendingHeadersCallback);

            // Streams
            stdout = new Fos.Streams.FosStdoutStream(sock);
            OwinContext.ResponseBody = Stdout;
            OwinContext.RequestBody  = Stdin;
        }