
| Current Path : /var/www/web-klick.de/dsh/50_1/1313__procpyjs/src/app/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/web-klick.de/dsh/50_1/1313__procpyjs/src/app/app.js |
var WebSocketServer = require('ws').Server,
wss = new WebSocketServer({
port: 8080
});
var ipc = require('ipc');
wss.on('connection', function connection(ws) {
ws.on('message', function incoming(message) {
console.log('received: %s', message);
});
ws.send('something');
});
//document.write('the current version of io.js is :' + process.version);
// var fs = require('fs');
// var contents = fs.readFileSync('./package.json', 'utf8');
// alert(contents);
ipc.on('asynchronous-message', function(event, arg) {
console.log(arg);
event.sender.send('asynchronous-reply', 'pong');
});