Sock.Httpportlist Property

Top  Previous  Next



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 the the 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, i.e. "80,81" (to accept HTTP connections on either port 80 or 81). Max string length for this property is 32 bytes.

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

For example, if the sock.httpportlist= "80,81", the sock.localportlist="3000,80", the 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 HTTP one.