socket.ref()
- 返回: <net.Socket> 套接字自身
与 unref()
相反,如果它是唯一剩下的套接字(默认行为),则在以前的 unref
套接字上调用 ref()
不会让程序退出。
如果套接字是 ref
的,再次调用 ref
将无效。
- Returns: <net.Socket> The socket itself.
Opposite of unref()
, calling ref()
on a previously unref
ed socket will
not let the program exit if it's the only socket left (the default behavior).
If the socket is ref
ed calling ref
again will have no effect.