Method HttpEndpoint():new() Professional

Creates an instance of the class HttpEndpoint.

Syntax
:new( [<nPort>] [,<cAddress>] ) --> oHttpEndpoint
Parameters
<nPort>
The optional numeric parameter <nPort> specifies the port on which the HttpEndpoint listens after the method :start() is called. The value <nPort> defaults to the HTTP standard port 80.
<cAddress>
The optional parameter <cAddress> is the IP address in dotted octed notation (e.g. "192.168.0.1") or hostname as a character string to which the HttpEndpoint binds after startup. If an asterisk ("*") is passed in the <cAddress> parameter, the HttpEndpoint can service multiple network interfaces and binds to all IP addresses of the installed network adapters. This includes "localhost". By default, the HttpEndpoint binds to the public address of the host.

If an IP address is specified in <cAddress>, the resulting binding is exclusive and prevents other HTTPEndpoint instances from binding to this IP address and port.

Return

The class method :new() returns an HttpEndpoint object.

Description

To bind the HttpEndpoint to a port from the range of the dynamic port range, the numerical value 0 must be passed in the parameter <nPort>. The port is assigned when the method :start() is called, and can be queried via the member variable :Port.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.