-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
44 lines (36 loc) · 1.03 KB
/
server.js
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var netcore = require('./index.js')();
var shepherd = netcore._controller;
netcore.start(function (err, res) {
console.log('started');
if (err) console.log(err);
netcore.permitJoin(180, function () {
console.log('permiJoin');
});
});
netcore.onReady = function () {
console.log('server ready11');
};
netcore.onDevIncoming = function (dev) {
console.log(dev);
};
netcore.onDevIncoming = function (dev) {
console.log(dev);
};
// shepherd.on('ready', function () {
// console.log('shepherd ready');
// //setTimeout(function () {
// shepherd.permitJoin(20);
// //}, 2000);
// //console.log(shepherd);
// shepherd.on('priphDisconnected', function (c) {
// console.log('some one disconnected');
// console.log(c.id);
// // var n = shepherd.find(c.id);
// // console.log(n.status);
// });
// });
// shepherd.on('ind:status', function (qnode, status) {
// console.log('ind:status');
// console.log(qnode.status);
// console.log(status);
// });