事件:'listening'


【Event: 'listening'

'listening' 事件在 dgram.Socket 可以被寻址并能够接收数据时触发。这可以通过 socket.bind() 显式发生,也可以在第一次使用 socket.send() 发送数据时隐式发生。在 dgram.Socket 开始监听之前,底层系统资源尚不存在,像 socket.address()socket.setTTL() 这样的调用将会失败。

【The 'listening' event is emitted once the dgram.Socket is addressable and can receive data. This happens either explicitly with socket.bind() or implicitly the first time data is sent using socket.send(). Until the dgram.Socket is listening, the underlying system resources do not exist and calls such as socket.address() and socket.setTTL() will fail.】