Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
docs: dgram client should be closed in the callback
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi authored and bnoordhuis committed Nov 11, 2011
1 parent 74f3904 commit 426298c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/api/dgram.markdown
Expand Up @@ -53,8 +53,9 @@ Example of sending a UDP packet to a random port on `localhost`;
var dgram = require('dgram');
var message = new Buffer("Some bytes");
var client = dgram.createSocket("udp4");
client.send(message, 0, message.length, 41234, "localhost");
client.close();
client.send(message, 0, message.length, 41234, "localhost", function(err, bytes) {
client.close();
});

**A Note about UDP datagram size**

Expand Down

0 comments on commit 426298c

Please sign in to comment.