UNPKG

sitespeed.io

Version:

Analyze the web performance of your site

17 lines (12 loc) 368 B
#!/usr/bin/env node /*eslint no-console: 0*/ const dgram = require('dgram'); const server = dgram.createSocket('udp4'); server.on('message', function (msg) { console.log(msg.toString()); }); server.on('listening', function () { const address = server.address(); console.log('udp server listening ' + address.address + ':' + address.port); }); server.bind();