网络编程
位置:首页>> 网络编程>> JavaScript>> ServerXMLHTTP的超时设置(setTimeouts)参数含义

ServerXMLHTTP的超时设置(setTimeouts)参数含义

作者:haihe 来源:海河 发布时间:2009-02-12 12:51:00 

标签:XMLHTTP,超时,服务器,时间,ajax

参数
Parameters

解析响应时间
resolveTimeout

数据类型:长整型。简单地说就是程序对目标主机的名字解析解析的一个过程时间。默认值是无限制,就是意味着不会超时
A long integer. The value is applied to mapping host names (such as "www.microsoft.com") to IP addresses; the default value is infinite, meaning no timeout.

连接响应时间
connectTimeout

数据类型:长整型。程序和目标服务器socket建立一个通讯。默认超时时间为60秒。
A long integer. The value is applied to establishing a communication socket with the targrt server, with a default timeout value of 60 seconds.

发送请求数据响应时间
sendTimeout

数据类型:长整型。 发送数据包给目标服务器,一个大的数据包通常被分割成若干个小的数据包来一个个的发送,程序发送各个数据包的发送响应超时时间。默认值是5分钟。
A long integer. 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 5 minutes.

接受数据响应时间
receiveTimeout

数据类型:长整型。从目标服务器返回的数据包。一个大的数据包通常被分割成若干个小的数据包来一个个的发送,程序从服务器接受各个数据包的响应超时时间。默认为60分钟
A long integer. 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 60 minutes.

使用方法(VBscript)

set XMLhttp= Server.CreateObject("Msxml2.ServerXMLHTTP")
XMLhttp.setTimeouts 10000,10000,10000,30000

序按上面依次排列,单位毫秒如果参数里的某一个超时那将超时返回,返回的COM异常错误码是0x80072EE2。

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com