From 70b0e8e2ac65aca17e9e321319bef918a281859a Mon Sep 17 00:00:00 2001 From: Divyanshu Singh Date: Thu, 29 Nov 2018 16:09:13 +0530 Subject: [PATCH] doc: clarify when `'listening'` event is emitted Clarify that the `'listening'` event is emitted when the underlying OS socket is created This occurs when either `socket.send()` or `socket.bind()` are first invoked for the respective socket. Fixes: https://github.com/nodejs/node/issues/23952 --- doc/api/dgram.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/dgram.md b/doc/api/dgram.md index 644dd3b15cae4e..e4ad0dac2d2adb 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -64,8 +64,8 @@ function is passed a single `Error` object. added: v0.1.99 --> -The `'listening'` event is emitted whenever a socket begins listening for -datagram messages. This occurs as soon as UDP sockets are created. +The `'listening'` event is emitted on the first invocation of either `socket.send()` +or `socket.bind()` for the respective socket. ### Event: 'message'