node-query/node_modules/mysql2/benchmarks/ping-pong-server.js

13 lines
188 B
JavaScript

var net = require('net');
var byte = new Buffer([0x33]);
function pong()
{
this.write(byte);
}
net.createServer(function(s) {
s.setNoDelay(true);
s.ondata = pong;
}).listen(3334);