From fc559db2d979ae588758a694c6522bf35768b768 Mon Sep 17 00:00:00 2001 From: rigwild Date: Wed, 8 Jan 2020 11:20:21 +0100 Subject: [PATCH] Added RPC messages --- index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0cec347..4b05182 100644 --- a/index.js +++ b/index.js @@ -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}`)