server.listen(handle[, backlog][, callback])
-
handle
<Object> -
backlog
<number>server.listen()
函数的通用参数¥
backlog
<number> Common parameter ofserver.listen()
functions -
callback
<Function> -
返回:<net.Server>
¥Returns: <net.Server>
启动服务器监听给定 handle
上的连接,该 handle
已经绑定到端口、Unix 域套接字或 Windows 命名管道。
¥Start a server listening for connections on a given handle
that has
already been bound to a port, a Unix domain socket, or a Windows named pipe.
handle
对象可以是服务器、套接字(任何具有底层 _handle
成员的对象)或具有 fd
成员(有效文件描述符)的对象。
¥The handle
object can be either a server, a socket (anything with an
underlying _handle
member), or an object with an fd
member that is a
valid file descriptor.
Windows 不支持监听文件描述符。
¥Listening on a file descriptor is not supported on Windows.