Beispiel #1
0
 public HttpService(Stream stream, string path, string webRoot, IWebSocketLogger logger)
 {
     _stream    = stream;
     _path      = path;
     _webRoot   = webRoot;
     _logger    = logger;
     _mimeTypes = MimeTypesFactory.GetMimeTypes(webRoot);
 }
Beispiel #2
0
        private const int BufferSize = 5 * 1024 * 1024; //5MB buffer

        public HttpBinaryService(Stream stream, string _sFilePath, string sRoot, string sHeader, IWebSocketLogger logger, bool bIsHead = false)
        {
            _stream       = stream;
            _logger       = logger;
            sFilePath     = _sFilePath;
            sWebroot      = sRoot;
            _mimeTypes    = MimeTypesFactory.GetMimeTypes(sWebroot);
            bSendHeadOnly = bIsHead;
            sHTTPHeader   = sHeader;
        }