Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-transport

Package Overview
Dependencies
Maintainers
1
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-transport - npm Package Compare versions

Comparing version 2.92.0 to 2.95.0

16

dist/source/server_tcp_transport.js

@@ -119,10 +119,14 @@ "use strict";

const defaultSendBufferSize = 64 * 1024;
if (!helloMessage.maxChunkCount && helloMessage.sendBufferSize) {
helloMessage.maxChunkCount = helloMessage.maxMessageSize / helloMessage.sendBufferSize;
const receiveBufferSize = clamp_value(helloMessage.receiveBufferSize || defaultReceiveBufferSize, minBufferSize, maxBufferSize);
const sendBufferSize = clamp_value(helloMessage.sendBufferSize || defaultSendBufferSize, minBufferSize, maxBufferSize);
const maxMessageSize = clamp_value(helloMessage.maxMessageSize || defaultMaxMessageSize, minMaxMessageSize, maxMaxMessageSize);
if (!helloMessage.maxChunkCount && sendBufferSize) {
helloMessage.maxChunkCount = Math.ceil(helloMessage.maxMessageSize / Math.min(sendBufferSize, receiveBufferSize));
}
const maxChunkCount = clamp_value(helloMessage.maxChunkCount || defaultMaxChunkCount, minMaxChunkCount, maxMaxChunkCount);
this.setLimits({
receiveBufferSize: clamp_value(helloMessage.receiveBufferSize || defaultReceiveBufferSize, minBufferSize, maxBufferSize),
sendBufferSize: clamp_value(helloMessage.sendBufferSize || defaultSendBufferSize, minBufferSize, maxBufferSize),
maxMessageSize: clamp_value(helloMessage.maxMessageSize || defaultMaxMessageSize, minMaxMessageSize, maxMaxMessageSize),
maxChunkCount: clamp_value(helloMessage.maxChunkCount || defaultMaxChunkCount, minMaxChunkCount, maxMaxChunkCount)
receiveBufferSize,
sendBufferSize,
maxMessageSize,
maxChunkCount
});

@@ -129,0 +133,0 @@ // istanbul ignore next

@@ -73,2 +73,6 @@ "use strict";

this.maxChunkCount = maxChunkCount;
if (maxMessageSize / sendBufferSize > maxChunkCount || maxMessageSize / receiveBufferSize > maxChunkCount) {
warningLog(`Warning : maxMessageSize / sendBufferSize ${maxMessageSize / sendBufferSize}> maxChunkCount ${maxChunkCount}
|| maxMessageSize / receiveBufferSize ${maxMessageSize / receiveBufferSize} < maxChunkCount `);
}
// reinstall packetAssembler with correct limits

@@ -75,0 +79,0 @@ this._install_packetAssembler();

{
"name": "node-opcua-transport",
"version": "2.92.0",
"version": "2.95.0",
"description": "pure nodejs OPCUA SDK - module -transport",

@@ -20,5 +20,5 @@ "main": "./dist/source/index.js",

"node-opcua-buffer-utils": "2.90.1",
"node-opcua-chunkmanager": "2.92.0",
"node-opcua-chunkmanager": "2.95.0",
"node-opcua-debug": "2.90.1",
"node-opcua-factory": "2.92.0",
"node-opcua-factory": "2.95.0",
"node-opcua-object-registry": "2.90.1",

@@ -48,3 +48,3 @@ "node-opcua-packet-assembler": "2.90.1",

"homepage": "http://node-opcua.github.io/",
"gitHead": "6ee0f52395af2c1f4f03518e675dc3f6edb7a455"
"gitHead": "ad7086f9c4cd2ab52922e26cb6782ec6b86f9d20"
}

@@ -156,15 +156,24 @@ /**

if (!helloMessage.maxChunkCount && helloMessage.sendBufferSize) {
helloMessage.maxChunkCount = helloMessage.maxMessageSize / helloMessage.sendBufferSize;
const receiveBufferSize = clamp_value(
helloMessage.receiveBufferSize || defaultReceiveBufferSize,
minBufferSize,
maxBufferSize
);
const sendBufferSize = clamp_value(helloMessage.sendBufferSize || defaultSendBufferSize, minBufferSize, maxBufferSize);
const maxMessageSize = clamp_value(
helloMessage.maxMessageSize || defaultMaxMessageSize,
minMaxMessageSize,
maxMaxMessageSize
);
if (!helloMessage.maxChunkCount && sendBufferSize) {
helloMessage.maxChunkCount = Math.ceil(helloMessage.maxMessageSize / Math.min(sendBufferSize, receiveBufferSize));
}
const maxChunkCount = clamp_value(helloMessage.maxChunkCount || defaultMaxChunkCount, minMaxChunkCount, maxMaxChunkCount);
this.setLimits({
receiveBufferSize: clamp_value(
helloMessage.receiveBufferSize || defaultReceiveBufferSize,
minBufferSize,
maxBufferSize
),
sendBufferSize: clamp_value(helloMessage.sendBufferSize || defaultSendBufferSize, minBufferSize, maxBufferSize),
maxMessageSize: clamp_value(helloMessage.maxMessageSize || defaultMaxMessageSize, minMaxMessageSize, maxMaxMessageSize),
maxChunkCount: clamp_value(helloMessage.maxChunkCount || defaultMaxChunkCount, minMaxChunkCount, maxMaxChunkCount)
receiveBufferSize,
sendBufferSize,
maxMessageSize,
maxChunkCount
});

@@ -171,0 +180,0 @@

@@ -166,2 +166,8 @@ /**

if(maxMessageSize / sendBufferSize > maxChunkCount || maxMessageSize / receiveBufferSize > maxChunkCount)
{
warningLog(`Warning : maxMessageSize / sendBufferSize ${maxMessageSize / sendBufferSize}> maxChunkCount ${maxChunkCount}
|| maxMessageSize / receiveBufferSize ${maxMessageSize / receiveBufferSize} < maxChunkCount `);
}
// reinstall packetAssembler with correct limits

@@ -168,0 +174,0 @@ this._install_packetAssembler();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc