From d81938d9396b77374bcd67742672548ad904035b Mon Sep 17 00:00:00 2001 From: dletta Date: Thu, 8 Aug 2024 14:17:48 -0500 Subject: [PATCH] Added HEP Ping needed by some receivers --- hep.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/hep.js b/hep.js index 4d1f1fd..6cdb0db 100644 --- a/hep.js +++ b/hep.js @@ -67,7 +67,21 @@ var getSocket = function (type) { socket = net.connect(hep_port, hep_server) } else if (type === 'tls') { socket = tls.connect(hep_port, hep_server) - console.log('TLS Socket', socket) + let ping = HEPjs.encapsulate('HEPPING', { + type: 'HEP', + version: 3, + payload_type: 0, + captureId: 2001, + capturePass: hep_pass, + ip_family: 2, + protocol: 17, + proto_type: 0, + }) + socket.write(ping, function(err) { + if(err){ + if(debug) console.log('tcp socket err on ping: ', err); + } + }) } var socketErrorHandler = (err)=>{