-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.js
More file actions
26 lines (24 loc) · 745 Bytes
/
Copy pathtest.js
File metadata and controls
26 lines (24 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var zephyr = require('./build/Release/zephyr');
console.dir(zephyr);
var cls = process.argv[2];
zephyr.subscribe([[cls]], function() {
zephyr.subs(function() {
console.dir(arguments);
});
zephyr.check(function(err, msg) {
console.log("%s / %s / %s [%s] (%s)\n%s",
msg.class, msg.instance, msg.sender,
msg.opcode, msg.signature, msg.message);
});
process.stdin.on('data', function(message) {
zephyr.send({
class: cls,
instance: inst,
signature: 'badass rockstar zephyr',
sender: 'zephyrnode',
message: message
}, function() {});
});
process.stdin.setEncoding('utf8');
process.stdin.resume();
});