mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
27 lines
462 B
JavaScript
27 lines
462 B
JavaScript
|
|
|
|
|
|
var punt = require('punt');
|
|
var server = punt.bind('0.0.0.0:5000');
|
|
var a = punt.connect('0.0.0.0:5000');
|
|
var b = punt.connect('0.0.0.0:5000');
|
|
var c = punt.connect('0.0.0.0:5000');
|
|
|
|
server.on('message', function(msg){
|
|
console.log(msg);
|
|
});
|
|
|
|
setInterval(function(){
|
|
a.send({ hello: 'world' });
|
|
}, 150);
|
|
|
|
setInterval(function(){
|
|
b.send('hello world');
|
|
}, 150);
|
|
|
|
setInterval(function(){
|
|
c.send(new Buffer('hello'));
|
|
}, 150);
|
|
|
|
process.emit('listening');
|