request.setTimeout(timeout[, callback])
timeout
<number> 请求超时前的毫秒数。callback
<Function> 发生超时时要调用的可选函数。 与绑定到'timeout'
事件相同。- 返回: <http.ClientRequest>
一旦套接字被分配给这个请求并被连接,则 socket.setTimeout()
将被调用。
timeout
<number> Milliseconds before a request times out.callback
<Function> Optional function to be called when a timeout occurs. Same as binding to the'timeout'
event.- Returns: <http.ClientRequest>
Once a socket is assigned to this request and is connected
socket.setTimeout()
will be called.