Example #1
0
        private void Init()
        {
#if SSL
            if (ssl_stream != null)
            {
                ssl_stream.AuthenticateAsServer(cert, true, (SslProtocols)ServicePointManager.SecurityProtocol, false);
            }
#endif
            _contextBound = false;
            _iStream      = null;
            _oStream      = null;
            Prefix        = null;
            _ms           = new MemoryStream();
            _position     = 0;
            _inputState   = InputState.RequestLine;
            _lineState    = LineState.None;
            _context      = new HttpListenerContext(this);
        }
Example #2
0
 public ResponseStream GetResponseStream()
 {
     return(_oStream ?? (_oStream = new ResponseStream(Stream, _context.Response, _context.Listener?.IgnoreWriteExceptions ?? true)));
 }