agent.reuseSocket(socket, request)
-
socket<stream.Duplex> -
request<http.ClientRequest>
当 socket 由于保持活动选项而持久化后附加到 request 时调用。默认行为是:
¥Called when socket is attached to request after being persisted because of
the keep-alive options. Default behavior is to:
socket.ref(); 此方法可以被特定的 Agent 子类覆盖。
¥This method can be overridden by a particular Agent subclass.
socket 参数可以是 <net.Socket>(<stream.Duplex> 的子类)的实例。
¥The socket argument can be an instance of <net.Socket>, a subclass of
<stream.Duplex>.