agent.reuseSocket(socket, request)


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