Example #1
0
 internal SocketConnection(GenericServer server, Socket socket)
 {
     Id = Guid.NewGuid();
     _responseContent = new MemoryStream();
     _server          = server;
     _socket          = socket;
     InitializeLogInfo();
 }
Example #2
0
 /// <summary>
 /// Create a request
 /// </summary>
 public Request(GenericServer server, Host host, IConnection connection)
     : base(string.Empty, string.Empty, null)
 {
     new PermissionSet(PermissionState.Unrestricted).Assert();
     _server     = server;
     _host       = host;
     _connection = connection;
 }
Example #3
0
        /// <summary>
        /// Configure host for a given server and paths
        /// </summary>
        public void Configure(GenericServer server, int port, string virtualPath, string physicalPath, bool disableDirectoryListing)
        {
            _server = server;

            DomainLoaded = true;
            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;

            Port                    = port;
            VirtualPath             = virtualPath;
            DisableDirectoryListing = disableDirectoryListing;
            _lowerCasedVirtualPath  = CultureInfo.InvariantCulture.TextInfo.ToLower(VirtualPath);
            NormalizedVirtualPath   = virtualPath.EndsWith("/", StringComparison.Ordinal)
                                                          ? virtualPath
                                                          : virtualPath + "/";
            NormalizedVirtualPath =
                CultureInfo.InvariantCulture.TextInfo.ToLower(NormalizedVirtualPath);
            PhysicalPath               = physicalPath;
            PhysicalClientScriptPath   = HttpRuntime.AspClientScriptPhysicalPath + "\\";
            NormalizedClientScriptPath =
                CultureInfo.InvariantCulture.TextInfo.ToLower(HttpRuntime.AspClientScriptVirtualPath + "/");
        }