'drop' 事件


当连接数达到 server.maxConnections 的阈值时,服务器将丢弃新的连接并触发 'drop' 事件。 如果是 TCP 服务器,参数如下,否则参数为 undefined

  • data <Object> 传给事件监听器的参数。
    • localAddress <string> 本地地址。
    • localPort <number> 本地端口。
    • localFamily <string> 本地族。
    • remoteAddress <string> 远程地址。
    • remotePort <number> 远程端口。
    • remoteFamily <string> 远程 IP 系列。 'IPv4''IPv6'

When the number of connections reaches the threshold of server.maxConnections, the server will drop new connections and emit 'drop' event instead. If it is a TCP server, the argument is as follows, otherwise the argument is undefined.

  • data <Object> The argument passed to event listener.