request.setTimeout(timeout[, callback])


一旦将套接字分配给此请求并且连接了套接字,就会调用 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.