336
Platforms
©2000-2008 Tibbo Technology Inc.
Details
This property is only relevant when incoming connections are allowed by the
property and the the
= 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
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.
.Httprqstring R/O Property
Function:
For the selected socket (selection is made through
) returns up to 255 bytes of the HTTP request
string stored in the VAR buffer.
Type:
String
Value Range:
Default= ""
See Also:
Details
The sock.httprqstring is a property; it can be invoked several times and will return
the same data (when this property is used the data is not deleted from the VAR
buffer). VAR buffer contents are explained in
.
This property is only relevant when the socket is in the HTTP mode (
= 1- YES). Use it from within an HTML page or
event
handler. Maximum length of data that can be obtained through this property is 255
bytes, since this is the maximum possible capacity of a string variable that will
accept the value of the sock.httprqstring.
HTTP requests can be much longer than 255 bytes and can even include entire files
being uploaded from the client to your device. Rely on the on_sock_postdata event
and the
method to handle large amounts of HTTP variable
data correctly.
If you are using the sock.httprqstring, and if the client sends more data
than can fit in the VAR buffer, the execution of the HTTP request will be
stalled indefinitely. To avoid this, reply on the on_sock_postdata even
and the sock.gethttprqstring method, as explained in
(Large Amount of Variable Data)
.
338
345
339
340
365
326
334
344
333
324