Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Commit

Permalink
Added RPC messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rigwild committed Jan 8, 2020
1 parent b33fddd commit fc559db
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion index.js
Expand Up @@ -18,7 +18,15 @@ ws.on('message', data => {
}
else if (data.startsWith('sniffer_sent ')) {
const packet = data.substring(13)
console.log(`[SNIFFER][SENT____] ${packet}`)
console.log(`[SNIFFER][__SENT__] ${packet}`)
}
else if (data.startsWith('sent ')) {
const packet = data.substring(5)
console.log(`[__RPC__][__SENT__] ${packet}`)
}
else if (data.startsWith('received ')) {
const packet = data.substring(13)
console.log(`[__RPC__][RECEIVED] ${packet}`)
}
else if (data === 'hello') console.log(`[SNIFFER][INIT] Sniffer connected successfully`)
else console.log(`[SNIFFER][UNKNOWN] ${data}`)
Expand Down

0 comments on commit fc559db

Please sign in to comment.