packages/core/lib/segment_emitter.js
function sendMessage (client, data, batchCallback) {
  var msg = data.msg;
  var offset = data.offset;
  var length = data.length;
  var port = data.port;
  var address = data.address;
  var callback = data.callback;

  client.send(msg, offset, length, port, address, function(err) {
    try {
      callback(err);
    } finally {
      batchCallback();
    }
  });
}
function sendMessage (client, data, batchCallback) {
  var msg = data.msg;
  var offset = data.offset;
  var length = data.length;
  var port = data.port;
  var address = data.address;
  var callback = data.callback;

  client.send(msg, offset, length, port, address, function(err) {
    try {
      callback(err);
    } finally {
      batchCallback();
    }
  });
}
function sendMessage ( client , data , batchCallback ) { var msg = data . msg ; var offset = data . offset ; var length = data . length ; var port = data . port ; var address = data . address ; var callback = data . callback ; client . send ( msg , offset , length , port , address , function ( err ) { try { callback ( err ) ; } finally { batchCallback ( ) ; } } ) ; }
Send a single message over a UDP socket.

@param {Socket} client - Socket to send data with
@param {object} data - Details of the data to send
@param {Function} batchCallback - Function to call when done
Send a single message over a UDP socket .