/// <summary> /// If the web server is running or not. /// </summary> /// <returns>True if the web server is running</returns> public static bool IsRunning() { return(WebServerManager.GetInstance().ServerIsRunning()); }
///<summary> /// Starts the web server and configures the network for the specified port. ///</summary> ///<param name="ipAddress">Ip address of the server</param> ///<param name="port">An <see cref="T:System.int"/> that specifies a port on which the web server runs.</param> ///<remarks> /// The server starts automatically when a resource is shared and the network interface is /// up. If this does not happen, stop the server before sharing data. /// </remarks> public static void StartLocalServer(string ipAddress, int port) { _ipAddress = ipAddress; _port = port; WebServerManager.GetInstance().StartServer(_ipAddress, _port); }
///<summary> /// Stops and removes a single resource. If the resource is requested again, the server will return the default page. ///</summary> ///<param name="webEvent">The <see cref="WebEvent"/> to be stopped</param> ///<returns>The result of the operation, <b>true</b> if the resource is found and removed, otherwise <b>false</b>.</returns> public static bool DisableWebEvent(WebEvent webEvent) { return(WebServerManager.GetInstance().Stop(webEvent)); }