This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async'), | |
dgram = require('dgram'); | |
var client = dgram.createSocket('udp4'); | |
var totalTimeTaken = 0; | |
var iterations = 115000; | |
var q = async.queue(function (task, cb) { | |
var buf = new Buffer(task.name.toString()); | |
var startTime = new Date().getTime(); | |
client.send(buf, 0, buf.length, 7125, '127.0.0.1', function () { |