node-opcua-transport
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -10,2 +10,6 @@ /// <reference types="node" /> | ||
timeout: number; | ||
/** | ||
* indicates the version number of the OPCUA protocol used | ||
* @default 0 | ||
*/ | ||
protocolVersion: number; | ||
@@ -18,2 +22,6 @@ bytesWritten: number; | ||
_socket: Socket | null; | ||
/** | ||
* the size of the header in bytes | ||
* @default 8 | ||
*/ | ||
private readonly headerSize; | ||
@@ -38,3 +46,3 @@ private _disconnecting; | ||
* @param length | ||
* @return {Buffer} a buffer object with the required length representing the chunk. | ||
* @return a buffer object with the required length representing the chunk. | ||
* | ||
@@ -49,3 +57,3 @@ * Note: | ||
* @method write | ||
* @param messageChunk {Buffer} | ||
* @param messageChunk | ||
* | ||
@@ -52,0 +60,0 @@ * Notes: |
@@ -39,13 +39,3 @@ "use strict"; | ||
this._socket = null; | ||
/** | ||
* @property headerSize the size of the header in bytes | ||
* @type {number} | ||
* @default 8 | ||
*/ | ||
this.headerSize = 8; | ||
/** | ||
* @property protocolVersion indicates the version number of the OPCUA protocol used | ||
* @type {number} | ||
* @default 0 | ||
*/ | ||
this.protocolVersion = 0; | ||
@@ -78,3 +68,3 @@ this._disconnecting = false; | ||
* @param length | ||
* @return {Buffer} a buffer object with the required length representing the chunk. | ||
* @return a buffer object with the required length representing the chunk. | ||
* | ||
@@ -97,3 +87,3 @@ * Note: | ||
* @method write | ||
* @param messageChunk {Buffer} | ||
* @param messageChunk | ||
* | ||
@@ -245,3 +235,3 @@ * Notes: | ||
* @event message | ||
* @param message_chunk {Buffer} the message chunk | ||
* @param message_chunk the message chunk | ||
*/ | ||
@@ -248,0 +238,0 @@ this.emit("message", messageChunk); |
{ | ||
"name": "node-opcua-transport", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "pure nodejs OPCUA SDK - module -transport", | ||
@@ -15,21 +15,21 @@ "main": "./dist/source/index.js", | ||
"node-opcua-assert": "^2.0.0", | ||
"node-opcua-basic-types": "^2.0.0", | ||
"node-opcua-binary-stream": "^2.0.0", | ||
"node-opcua-buffer-utils": "^2.0.0", | ||
"node-opcua-chunkmanager": "^2.0.0", | ||
"node-opcua-debug": "^2.0.0", | ||
"node-opcua-factory": "^2.0.0", | ||
"node-opcua-nodeid": "^2.0.0", | ||
"node-opcua-basic-types": "^2.1.0", | ||
"node-opcua-binary-stream": "^2.1.0", | ||
"node-opcua-buffer-utils": "^2.1.0", | ||
"node-opcua-chunkmanager": "^2.1.0", | ||
"node-opcua-debug": "^2.1.0", | ||
"node-opcua-factory": "^2.1.0", | ||
"node-opcua-nodeid": "^2.1.0", | ||
"node-opcua-packet-assembler": "^2.0.0", | ||
"node-opcua-status-code": "^2.0.0", | ||
"node-opcua-types": "^2.0.0", | ||
"node-opcua-utils": "^2.0.0", | ||
"node-opcua-status-code": "^2.1.0", | ||
"node-opcua-types": "^2.1.0", | ||
"node-opcua-utils": "^2.1.0", | ||
"underscore": "^1.9.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^12.0.2", | ||
"@types/underscore": "^1.8.18", | ||
"@types/node": "^12.6.2", | ||
"@types/underscore": "^1.9.2", | ||
"colors": "^1.3.3", | ||
"node-opcua-debug": "^2.0.0-alpha.5", | ||
"node-opcua-generator": "^2.0.0", | ||
"node-opcua-generator": "^2.1.0", | ||
"should": "13.2.3", | ||
@@ -53,3 +53,3 @@ "sinon": "^7.3.2" | ||
"homepage": "http://node-opcua.github.io/", | ||
"gitHead": "deed061b032e8490d44f59fc42559d413968ab89" | ||
"gitHead": "ddce2b6e3e13371510e63d839c1a4c4ff0be2c15" | ||
} |
@@ -43,2 +43,6 @@ /** | ||
public timeout: number; | ||
/** | ||
* indicates the version number of the OPCUA protocol used | ||
* @default 0 | ||
*/ | ||
public protocolVersion: number; | ||
@@ -54,2 +58,6 @@ | ||
/** | ||
* the size of the header in bytes | ||
* @default 8 | ||
*/ | ||
private readonly headerSize: 8; | ||
@@ -75,13 +83,3 @@ private _disconnecting: boolean; | ||
this._socket = null; | ||
/** | ||
* @property headerSize the size of the header in bytes | ||
* @type {number} | ||
* @default 8 | ||
*/ | ||
this.headerSize = 8; | ||
/** | ||
* @property protocolVersion indicates the version number of the OPCUA protocol used | ||
* @type {number} | ||
* @default 0 | ||
*/ | ||
this.protocolVersion = 0; | ||
@@ -120,3 +118,3 @@ | ||
* @param length | ||
* @return {Buffer} a buffer object with the required length representing the chunk. | ||
* @return a buffer object with the required length representing the chunk. | ||
* | ||
@@ -144,3 +142,3 @@ * Note: | ||
* @method write | ||
* @param messageChunk {Buffer} | ||
* @param messageChunk | ||
* | ||
@@ -155,3 +153,3 @@ * Notes: | ||
assert((this._pendingBuffer === undefined) | ||
|| this._pendingBuffer === messageChunk, " write should be used with buffer created by createChunk"); | ||
|| this._pendingBuffer === messageChunk, " write should be used with buffer created by createChunk"); | ||
@@ -251,6 +249,6 @@ const header = readRawMessageHeader(messageChunk); | ||
this._socket | ||
.on("data", (data: Buffer) => this._on_socket_data(data)) | ||
.on("close", (hadError) => this._on_socket_close(hadError)) | ||
.on("end", (err: Error) => this._on_socket_end(err)) | ||
.on("error", (err: Error) => this._on_socket_error(err)); | ||
.on("data", (data: Buffer) => this._on_socket_data(data)) | ||
.on("close", (hadError) => this._on_socket_close(hadError)) | ||
.on("end", (err: Error) => this._on_socket_end(err)) | ||
.on("error", (err: Error) => this._on_socket_error(err)); | ||
@@ -321,3 +319,3 @@ const doDestroyOnTimeout = false; | ||
* @event message | ||
* @param message_chunk {Buffer} the message chunk | ||
* @param message_chunk the message chunk | ||
*/ | ||
@@ -342,3 +340,3 @@ this.emit("message", messageChunk); | ||
this._fulfill_pending_promises( | ||
new Error(`Timeout in waiting for data on socket ( timeout was = ${this.timeout} ms)`)); | ||
new Error(`Timeout in waiting for data on socket ( timeout was = ${this.timeout} ms)`)); | ||
}, this.timeout); | ||
@@ -351,3 +349,3 @@ | ||
this._fulfill_pending_promises( | ||
new Error(`ERROR in waiting for data on socket ( timeout was = ${this.timeout} ms)`)); | ||
new Error(`ERROR in waiting for data on socket ( timeout was = ${this.timeout} ms)`)); | ||
}; | ||
@@ -387,7 +385,7 @@ this._socket.on("close", this._on_error_during_one_time_message_receiver); | ||
debugLog(chalk.red(" SOCKET CLOSE : "), | ||
chalk.yellow("had_error ="), chalk.cyan(hadError.toString()), this.name); | ||
chalk.yellow("had_error ="), chalk.cyan(hadError.toString()), this.name); | ||
} | ||
if (this._socket) { | ||
debugLog(" remote address = ", | ||
this._socket.remoteAddress, " ", this._socket.remoteFamily, " ", this._socket.remotePort); | ||
this._socket.remoteAddress, " ", this._socket.remoteFamily, " ", this._socket.remotePort); | ||
} | ||
@@ -394,0 +392,0 @@ if (hadError) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232458
3891
Updatednode-opcua-debug@^2.1.0
Updatednode-opcua-factory@^2.1.0
Updatednode-opcua-nodeid@^2.1.0
Updatednode-opcua-types@^2.1.0
Updatednode-opcua-utils@^2.1.0