File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,10 @@ Provides DNS resolution for a hostname.
236
236
- ` domain ` domain name
237
237
- ` function(net.socket, ip) ` callback function. The first parameter is the socket, the second parameter is the IP address as a string.
238
238
239
+ If a callback ` c ` is provided, it is equivalent to having called `: on ("dns",
240
+ c)` on this socket; this callback will, hereafter, receive any pending
241
+ resolution results recieved for this socket!
242
+
239
243
#### Returns
240
244
` nil `
241
245
@@ -580,6 +584,11 @@ Resolve a hostname to an IP address. Doesn't require a socket like [`net.socket.
580
584
- ` host ` hostname to resolve
581
585
- ` function(sk, ip) ` callback called when the name was resolved. ` sk ` is always ` nil `
582
586
587
+ There is at most one callback for all ` net.dns.resolve() ` requests at any time;
588
+ all resolution results are sent to the most recent callback specified at time
589
+ of receipt! If multiple DNS callbacks are needed, associate them with separate
590
+ sockets using [ ` net.socket:dns() ` ] ( #netsocketdns ) .
591
+
583
592
#### Returns
584
593
` nil `
585
594
You can’t perform that action at this time.
0 commit comments