mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-17 16:53:13 +00:00
Much improved, better stability, lots of fixes
This commit is contained in:
18
Debug/newstringtest.js
Normal file
18
Debug/newstringtest.js
Normal file
@@ -0,0 +1,18 @@
|
||||
var http = require('http');
|
||||
|
||||
console.log('starting client test');
|
||||
console.log('Sending Request');
|
||||
var req = http.request({host: '127.0.0.1', port: 9093, protocol: 'ws:'});
|
||||
|
||||
|
||||
req.on('upgrade', function (res, sk, h)
|
||||
{
|
||||
sk.on('ping', function () { console.log('received ping'); });
|
||||
sk.on('pong', function () { console.log('received pong'); });
|
||||
this.websocket = sk;
|
||||
|
||||
console.log("Upgraded to WebSocket!"); sk.write(JSON.stringify({ a: 'hello' }));
|
||||
});
|
||||
//req.end();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user