socket.ref()


unref() 的反操作是在先前 unref 的套接字上调用 ref(),这样即使这是唯一剩下的套接字也不会让程序退出(默认行为)。如果套接字已经是 ref 状态,再次调用 ref 不会有任何效果。

【Opposite of unref(), calling ref() on a previously unrefed socket will not let the program exit if it's the only socket left (the default behavior). If the socket is refed calling ref again will have no effect.】