Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
MessageBuilder.prototype._safe_decode_message_body = function (full_message_body, objMessage, binaryStream) {
try {
// de-serialize the object from the binary stream
const options = this.objectFactory;
objMessage.decode(binaryStream, options);
}
catch (err) {
console.log(err);
console.log(err.stack);
console.log(hexDump(full_message_body));
packet_analyzer(full_message_body);
console.log(" ---------------- block");
let i=0;
this.message_chunks.forEach(function (messageChunk) {
console.log(" ---------------- chunk i=",i++);
console.log(hexDump(messageChunk));
});
return false;
}
return true;
};
messageBuilder.on("full_message_body", function (full_message_body) {
console.log("full_message_body received:");
packet_analyzer(full_message_body);
});
messageBuilder.on("start_chunk", function (info, data) {