Skip to content

Commit

Permalink
Added HEP Ping needed by some receivers
Browse files Browse the repository at this point in the history
  • Loading branch information
Dletta committed Aug 8, 2024
1 parent f8ed323 commit d81938d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion hep.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)=>{
Expand Down

0 comments on commit d81938d

Please sign in to comment.