Start listening for client connections on the specified IP address and port number.
A boolean value which specifies if the server was started. A return value of true specifies that the server has been successfully started. If an error occurs, the method returns false and the application should check the value of the LastError property to determine the cause of the failure
The Start method begins listening for client connections on the specified local address and port number. The server is started in its own thread and manages the client sessions independently of the calling thread.
To listen for connections on any suitable IPv4 interface, specify the special dotted-quad address "0.0.0.0". You can accept connections from clients using either IPv4 or IPv6 on the same socket by specifying the special IPv6 address "::0", however this is only supported on Windows 7 SP1 and Windows Server 2008 R2 or later platforms. If no local address is specified, then the server will only listen for connections from clients using IPv4. This behavior is by design for backwards compatibility with systems that do not have an IPv6 TCP/IP stack installed.
It is recommended that you always specify an absolute path for the server root directory, either by passing the full pathname as an argument to this method or by setting the Directory property. If the path includes environment variables surrounded by percent (%) symbols, they will be automatically expanded.
If you have configured the server to permit clients to upload files, you must ensure that your application has permission to create files in the directory that you specify. A recommended location for the server root directory would be a subdirectory of the %ALLUSERSPROFILE% directory. Using the environment variable ensures that your server will work correctly on different versions of Windows. If the root directory does not exist at the time that the server is started, it will be created.
HttpServer Class | SocketTools Namespace | HttpServer.Start Overload List