Sha256: c153b9af23c6d1b99907501c1ad0aa7c16e2b0e625528ac456083a2cac67b43a

Contents?: true

Size: 511 Bytes

Versions: 15

Compression:

Stored size: 511 Bytes

Contents

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);
    });
})();
}

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
mt-libuv-4.1.04 ext/libuv/docs/code/multi-echo-server/hammer.js
mt-libuv-4.1.03 ext/libuv/docs/code/multi-echo-server/hammer.js
mt-libuv-4.1.02 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-4.0.9 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-4.0.2 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-4.0.1 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-4.0.0 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-3.3.0 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-3.2.4 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-3.2.3 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-3.2.2 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-3.2.1 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-3.2.0 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-3.1.9 ext/libuv/docs/code/multi-echo-server/hammer.js
libuv-3.1.8 ext/libuv/docs/code/multi-echo-server/hammer.js