agent.reuseSocket(socket, request)

由于 keep-alive 选项而在持久化后将 socket 附加到 request 时调用。 默认行为是:


此方法可以由特定的 Agent 子类重写。

socket 参数可以是 <net.Socket><stream.Duplex> 的子类)的实例。

Called when socket is attached to request after being persisted because of the keep-alive options. Default behavior is to:


This method can be overridden by a particular Agent subclass.

The socket argument can be an instance of <net.Socket>, a subclass of <stream.Duplex>.