Timeout (HttpRequest property)

From m204wiki
Revision as of 18:29, 15 June 2011 by JALWiccan (talk | contribs) (1 revision)
Jump to navigation Jump to search

Template:HTTPRequest:Timeout subtitle

This method lets you set and query a timeout value for a Get, Post, or Send method invocation. The timeout (in wall-clock seconds) is the sum of the elaped time of all network transfers for a Get, Post, or Send, including connecting, sending the HTTP request, and fetching all the data (independent of how many TCP/IP get operations or HTTP chunks are required to obtain the response).

The Timeout value is also the timeout for each of the inidvidual Get, Post, or Send network operations. That is, for each TCP/IP read or write operation (as well as for the sum of these operations), the Timeout property value overrides any Janus port definition TIMEOUT setting for the socket. If no Timeout property value is set, the port TIMEOUT setting (if any) is used.

Syntax

Template:HTTPRequest:Timeout syntax

Syntax terms

%httpreq An instantiated HTTPRequest object.
value A numeric expression that evaluates to an integer from 0 through 32767, which indicates the maximum number of wall-clock seconds that a Get, Post, or Send method invocation may take. If an invalid or out of range value is specified, the request is canceled. A value of 0 (the default) means no timeout is enforced.
%curr The numeric variable for the assignment of the current value of Timeout.

Usage notes

  • Typically, you set Timeout to the maximum wait you want your end users to experience.
  • If a Get, Post, or Send function times out, the function response is set to null, $STATUSD is set to 101, and whether the request is cancelled depends on the value of the Cancel parameter on the Get, Post, or Send call.

See also

Template:HTTPRequest:Timeout footer