Skip to content

Commit

Permalink
added a fact-specific patch for use by others
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpalumbo committed Jan 13, 2021
1 parent cf92fb5 commit ba6f1b2
Show file tree
Hide file tree
Showing 3 changed files with 1,146 additions and 3 deletions.
18 changes: 15 additions & 3 deletions allhands_cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ if (mode === "server"){
let APRoot = msg.addressPattern.split('/')[1]
// Max.outlet(msg.addressPattern, msg.typeTagString)

if(APRoot == 'ping'){
console.log('pingTime:', msg.typeTagString + 'ms')
}
// if(APRoot == 'ping'){
// console.log('pingTime:', msg.typeTagString + 'ms')
// }
// prevent data loopback from server broadcast (i.e. we don't ewant to receive our own)
if(APRoot != name){
localSend.send(msg.addressPattern, msg.typeTagString, (err) => {
Expand All @@ -247,7 +247,19 @@ if (mode === "server"){
ws.send(pong)
// console.log(pong)
break
case 'pingReport':
// console.log(msg.data)
let remotes = Object.keys(msg.data)
for(i=0;i<remotes.length;i++){
console.log(remotes[i], msg.data[remotes[i]])
let ap = '/latency/' + remotes[i]
let tts = msg.data[remotes[i]]
localSend.send(ap, tts, (err) => {
if (err) console.error(err);
});
}

break
default:
// inform user that unknown message commang used
console.log('client sent message with unknown cmd: ' + msg.cmd)
Expand Down
Loading

0 comments on commit ba6f1b2

Please sign in to comment.