Mercurial
view third_party/libuv/docs/code/multi-echo-server/hammer.js @ 262:0f45474c1b1a
Add cyberpunk JRPG blog browser
Show the latest posts in the JRPG preview and render the full blog archive and sanitized post details in the Inspect modal.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <mrjunejune@users.noreply.github.com> |
|---|---|
| date | Thu, 06 Aug 2026 04:08:45 -0700 |
| parents | 948de3f54cea |
| children |
line wrap: on
line source
var net = require('net'); var PHRASE = "hello world"; var write = function(socket) { socket.write(PHRASE, 'utf8'); } for (var i = 0; i < 1000; i++) { (function() { var socket = net.connect(7000, 'localhost', function() { socket.on('data', function(reply) { if (reply.toString().indexOf(PHRASE) != 0) console.error("Problem! '" + reply + "'" + " '" + PHRASE + "'"); else write(socket); }); write(socket); }); })(); }