agent.reuseSocket(socket, request)


socket 由于保持活动选项而持久化后附加到 request 时调用。 默认行为是:

socket.ref();

此方法可以被特定的 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:

socket.ref();

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>.