Browse Source

docs: dgram client should be closed in the callback

v0.7.4-release
Yoji SHIDARA 13 years ago
committed by Ben Noordhuis
parent
commit
426298c8c1
  1. 5
      doc/api/dgram.markdown

5
doc/api/dgram.markdown

@ -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**

Loading…
Cancel
Save