.httpportlist Property


For the currently selected socket (selection is made through sock.num), sets/returns the list of listening ports, on any of which this socket will accept an incoming HTTP connection.



Value Range:

0-32 characters, default = ""

See Also:

sock.localport, sock.httpmode


This property is only relevant when incoming connections are allowed by the sock.inconmode property and sock.protocol = 1 — PL_SOCK_PROTOCOL_TCP (HTML output cannot be done through the UDP).

This property is of string type and the list of ports is a comma-separated string (e.g., "80,81" to accept HTTP connections on either port 80 or 81). The maximum string length for this property is 32 bytes.

Note that there is also the sock.localportlist property that defines the list of listening ports for UDP and non-HTTP TCP connections. When a particular port is listed both under sock.localportlist and sock.httpportlist, and the protocol for this socket is TCP, then sock.httpportlist has precedence (an incoming TCP connection on the port in question will be interpreted as HTTP).

For example, if sock.httpportlist = "80,81"; sock.localportlist = "3000,80"; sock.protocol = 1 — PL_SOCK_PROTOCOL_TCP; and there is an incoming TCP connection request on port 80, then this connection will be interpreted as an HTTP one.

.httpportlist Property