ServerXMLHTTPRequest.SetTimeouts

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > MSXML2 > MSXML2 Module Classes > ServerXMLHTTPRequest >

ServerXMLHTTPRequest.SetTimeouts

 

Description

 
Specifies timeout settings for resolving the domain name, establishing the connection to the server, sending the data, and receiving the response.

 

Syntax

 

<ServerXMLHTTPRequest>.SetTimeouts(resolveTimeout, connectTimeout, sendTimeout, receiveTimeout)

 

Returns

 

None.

 

Parameters

 

Name

Type

Optional

Meaning

resolveTimeout

Number

No

The value is applied to mapping host names (such as "www.thinbasic.com") to IP addresses; the default value is infinite, meaning no timeout.

connectTimeout

Number

No

The value is applied to establishing a communication socket with the target server, with a default timeout value of 60 seconds.

sendTimeout

Number

No

The value applies to sending an individual packet of request data (if any) on the communication socket to the target server. A large request sent to a server will normally be broken up into multiple packets; the send timeout applies to sending each packet individually. The default value is 30 seconds.

receiveTimeout

Number

No

The value applies to receiving a packet of response data from the target server. Large responses will be broken up into multiple packets; the receive timeout applies to fetching each packet of data off the socket. The default value is 30 seconds.

 

 

Remarks

 

The timeout parameters of the setTimeouts method are specified in milliseconds, so a value of 1000 would represent 1 second. A value of zero represents an infinite timeout. There are four separate timeout parameters: resolveTimeout, connectTimeout, sendTimeout, and receiveTimeout. When calling the setTimeouts method, all four values must be specified.

 

Reference: https://msdn.microsoft.com/en-us/library/ms760403(v=vs.85).aspx

 

Restrictions

 

See also

 

Examples