Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
channelId: this.securityToken.channelId,
chunkSize: this.transport.receiveBufferSize,
requestId,
tokenId: this.securityToken.tokenId
};
const securityOptions =
msgType === "OPN" ? this._get_security_options_for_OPN() : this._get_security_options_for_MSG();
options = _.extend(options, securityOptions);
response.responseHeader.requestHandle = request.requestHeader.requestHandle;
/* istanbul ignore next */
if (0 && doDebug) {
console.log(" options ", options);
analyze_object_binary_encoding(response as any as BaseUAObject);
}
/* istanbul ignore next */
if (doTraceMessage) {
console.log(
chalk.cyan.bold("xxxx >>>> ---------------------------------------- "),
chalk.green.bold(response.schema.name),
requestId
);
console.log(response.toString());
console.log(chalk.cyan.bold("xxxx >>>> ----------------------------------------|\n"));
}
if (this._on_response) {
this._on_response(msgType, response, message);
}
};
assert(options.secureChannelId > 0);
const security_options =
msgType === "OPN" ? self._get_security_options_for_OPN() : self._get_security_options_for_MSG();
options = _.extend(options, security_options);
//xx assert(_.isFinite(request.requestHeader.requestHandle));
response.responseHeader.requestHandle = request.requestHeader.requestHandle;
/* istanbul ignore next */
if (0 && doDebug) {
console.log(" options ", options);
analyze_object_binary_encoding(response);
}
//xx console.log(" sending request ".bgWhite.red,requestId,message.request.constructor.name);
/* istanbul ignore next */
if (do_trace_message) {
console.log(
"xxxx >>>> ---------------------------------------- ".cyan.bold,
response._schema.name.green.bold,
requestId
);
console.log(response.toString());
console.log("xxxx >>>> ----------------------------------------|\n".cyan.bold);
}
if (self._on_response) {