view third_party/libuv/docs/code/multi-echo-server/hammer.js @ 275:78699f810817

Add Qwen3-VL and WebRTC dictation services Add Bazel targets for the CUDA-backed Qwen3-VL server and a local WebRTC faster-whisper dictation service. Co-authored-by: Copilot <[email protected]> Copilot-Session: e3d8cb06-6c95-4ae0-9757-651d3796ab00
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 10:58:47 -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);
    });
})();
}