index.js
function send(host, port, payload, callback) {
	// Create a Buffer of the JSON stringified payload, so we can send it.
	var data = new Buffer(JSON.stringify(payload));

	// Resolve or reject the promise once the we have at least attempted to
	// send the payload. Should we add some sort of a retry on error?
	return client.send(data, 0, data.length, port, host, callback);
}
function send(host, port, payload, callback) {
	// Create a Buffer of the JSON stringified payload, so we can send it.
	var data = new Buffer(JSON.stringify(payload));

	// Resolve or reject the promise once the we have at least attempted to
	// send the payload. Should we add some sort of a retry on error?
	return client.send(data, 0, data.length, port, host, callback);
}
function send ( host , port , payload , callback ) { // Create a Buffer of the JSON stringified payload, so we can send it. var data = new Buffer ( JSON . stringify ( payload ) ) ; // Resolve or reject the promise once the we have at least attempted to // send the payload. Should we add some sort of a retry on error? return client . send ( data , 0 , data . length , port , host , callback ) ; }
Send data via UDP to the target server.

@param {string} host     Server host.
@param {string} port     Server port.
@param {object} payload  Payload object, that will be made into a string,
and sent to the server.

@return {Promise}  Promise for sending the payload.
Send data via UDP to the target server .