node-opcua-transport 2.96.0 → 2.98.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/package.json +13 -13
  2. package/dist/source/AcknowledgeMessage.d.ts +0 -27
  3. package/dist/source/AcknowledgeMessage.js +0 -79
  4. package/dist/source/AcknowledgeMessage.js.map +0 -1
  5. package/dist/source/HelloMessage.d.ts +0 -27
  6. package/dist/source/HelloMessage.js +0 -95
  7. package/dist/source/HelloMessage.js.map +0 -1
  8. package/dist/source/TCPErrorMessage.d.ts +0 -18
  9. package/dist/source/TCPErrorMessage.js +0 -47
  10. package/dist/source/TCPErrorMessage.js.map +0 -1
  11. package/dist/source/client_tcp_transport.d.ts +0 -87
  12. package/dist/source/client_tcp_transport.js +0 -335
  13. package/dist/source/client_tcp_transport.js.map +0 -1
  14. package/dist/source/index.d.ts +0 -13
  15. package/dist/source/index.js +0 -30
  16. package/dist/source/index.js.map +0 -1
  17. package/dist/source/message_builder_base.d.ts +0 -112
  18. package/dist/source/message_builder_base.js +0 -245
  19. package/dist/source/message_builder_base.js.map +0 -1
  20. package/dist/source/server_tcp_transport.d.ts +0 -44
  21. package/dist/source/server_tcp_transport.js +0 -233
  22. package/dist/source/server_tcp_transport.js.map +0 -1
  23. package/dist/source/status_codes.d.ts +0 -100
  24. package/dist/source/status_codes.js +0 -111
  25. package/dist/source/status_codes.js.map +0 -1
  26. package/dist/source/tcp_transport.d.ts +0 -136
  27. package/dist/source/tcp_transport.js +0 -380
  28. package/dist/source/tcp_transport.js.map +0 -1
  29. package/dist/source/tools.d.ts +0 -14
  30. package/dist/source/tools.js +0 -104
  31. package/dist/source/tools.js.map +0 -1
  32. package/dist/source/utils.d.ts +0 -3
  33. package/dist/source/utils.js +0 -10
  34. package/dist/source/utils.js.map +0 -1
  35. package/dist/test-fixtures/fixture_full_tcp_packets.d.ts +0 -21
  36. package/dist/test-fixtures/fixture_full_tcp_packets.js +0 -413
  37. package/dist/test-fixtures/fixture_full_tcp_packets.js.map +0 -1
  38. package/dist/test-fixtures/index.d.ts +0 -1
  39. package/dist/test-fixtures/index.js +0 -18
  40. package/dist/test-fixtures/index.js.map +0 -1
  41. package/dist/test_helpers/direct_transport.d.ts +0 -18
  42. package/dist/test_helpers/direct_transport.js +0 -63
  43. package/dist/test_helpers/direct_transport.js.map +0 -1
  44. package/dist/test_helpers/fake_server.d.ts +0 -19
  45. package/dist/test_helpers/fake_server.js +0 -55
  46. package/dist/test_helpers/fake_server.js.map +0 -1
  47. package/dist/test_helpers/half_com_channel.d.ts +0 -17
  48. package/dist/test_helpers/half_com_channel.js +0 -32
  49. package/dist/test_helpers/half_com_channel.js.map +0 -1
  50. package/dist/test_helpers/index.d.ts +0 -4
  51. package/dist/test_helpers/index.js +0 -21
  52. package/dist/test_helpers/index.js.map +0 -1
  53. package/dist/test_helpers/socket_transport.d.ts +0 -10
  54. package/dist/test_helpers/socket_transport.js +0 -31
  55. package/dist/test_helpers/socket_transport.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-opcua-transport",
3
- "version": "2.96.0",
3
+ "version": "2.98.0",
4
4
  "description": "pure nodejs OPCUA SDK - module -transport",
5
5
  "main": "./dist/source/index.js",
6
6
  "types": "./dist/source/index.d.ts",
@@ -14,20 +14,20 @@
14
14
  "dependencies": {
15
15
  "chalk": "4.1.2",
16
16
  "node-opcua-assert": "2.88.0",
17
- "node-opcua-basic-types": "2.92.0",
18
- "node-opcua-binary-stream": "2.90.1",
19
- "node-opcua-buffer-utils": "2.90.1",
20
- "node-opcua-chunkmanager": "2.95.0",
21
- "node-opcua-debug": "2.90.1",
22
- "node-opcua-factory": "2.95.0",
23
- "node-opcua-object-registry": "2.90.1",
24
- "node-opcua-packet-assembler": "2.90.1",
25
- "node-opcua-status-code": "2.90.1",
26
- "node-opcua-utils": "2.90.1"
17
+ "node-opcua-basic-types": "2.98.0",
18
+ "node-opcua-binary-stream": "2.98.0",
19
+ "node-opcua-buffer-utils": "2.98.0",
20
+ "node-opcua-chunkmanager": "2.98.0",
21
+ "node-opcua-debug": "2.98.0",
22
+ "node-opcua-factory": "2.98.0",
23
+ "node-opcua-object-registry": "2.98.0",
24
+ "node-opcua-packet-assembler": "2.98.0",
25
+ "node-opcua-status-code": "2.98.0",
26
+ "node-opcua-utils": "2.98.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "should": "^13.2.3",
30
- "sinon": "^15.0.1"
30
+ "sinon": "^15.0.3"
31
31
  },
32
32
  "author": "Etienne Rossignon",
33
33
  "license": "MIT",
@@ -44,5 +44,5 @@
44
44
  "internet of things"
45
45
  ],
46
46
  "homepage": "http://node-opcua.github.io/",
47
- "gitHead": "43642e4aaa1ca2a3938b044cc2237544dfff764a"
47
+ "gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c"
48
48
  }
@@ -1,27 +0,0 @@
1
- /**
2
- * @module node-opcua-transport
3
- */
4
- import { UInt32 } from "node-opcua-basic-types";
5
- import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
6
- import { BaseUAObject, IStructuredTypeSchema } from "node-opcua-factory";
7
- interface AcknowledgeMessageOptions {
8
- protocolVersion?: UInt32;
9
- receiveBufferSize?: UInt32;
10
- sendBufferSize?: UInt32;
11
- maxMessageSize?: UInt32;
12
- maxChunkCount?: UInt32;
13
- }
14
- export declare class AcknowledgeMessage extends BaseUAObject {
15
- static possibleFields: string[];
16
- static schema: IStructuredTypeSchema;
17
- protocolVersion: UInt32;
18
- receiveBufferSize: UInt32;
19
- sendBufferSize: UInt32;
20
- maxMessageSize: UInt32;
21
- maxChunkCount: UInt32;
22
- constructor(options?: AcknowledgeMessageOptions);
23
- encode(stream: OutputBinaryStream): void;
24
- decode(stream: BinaryStream): void;
25
- toString(): string;
26
- }
27
- export {};
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AcknowledgeMessage = void 0;
4
- /**
5
- * @module node-opcua-transport
6
- */
7
- const node_opcua_basic_types_1 = require("node-opcua-basic-types");
8
- const node_opcua_factory_1 = require("node-opcua-factory");
9
- const schemaAcknowledgeMessage = (0, node_opcua_factory_1.buildStructuredType)({
10
- name: "AcknowledgeMessage",
11
- baseType: "BaseObjectType",
12
- fields: [
13
- {
14
- name: "protocolVersion",
15
- fieldType: "UInt32",
16
- documentation: "The latest version of the OPC UA TCP protocol supported by the Server."
17
- },
18
- { name: "receiveBufferSize", fieldType: "UInt32" },
19
- { name: "sendBufferSize", fieldType: "UInt32" },
20
- { name: "maxMessageSize", fieldType: "UInt32", documentation: "The maximum size for any request message." },
21
- {
22
- name: "maxChunkCount",
23
- fieldType: "UInt32",
24
- documentation: "The maximum number of chunks in any request message."
25
- }
26
- ]
27
- });
28
- class AcknowledgeMessage extends node_opcua_factory_1.BaseUAObject {
29
- constructor(options) {
30
- options = options || {};
31
- super();
32
- const schema = schemaAcknowledgeMessage;
33
- /* istanbul ignore next */
34
- if (node_opcua_factory_1.parameters.debugSchemaHelper) {
35
- (0, node_opcua_factory_1.check_options_correctness_against_schema)(this, schema, options);
36
- }
37
- this.protocolVersion = (0, node_opcua_factory_1.initialize_field)(schema.fields[0], options.protocolVersion);
38
- this.receiveBufferSize = (0, node_opcua_factory_1.initialize_field)(schema.fields[1], options.receiveBufferSize);
39
- this.sendBufferSize = (0, node_opcua_factory_1.initialize_field)(schema.fields[2], options.sendBufferSize);
40
- this.maxMessageSize = (0, node_opcua_factory_1.initialize_field)(schema.fields[3], options.maxMessageSize);
41
- this.maxChunkCount = (0, node_opcua_factory_1.initialize_field)(schema.fields[4], options.maxChunkCount);
42
- }
43
- encode(stream) {
44
- super.encode(stream);
45
- (0, node_opcua_basic_types_1.encodeUInt32)(this.protocolVersion, stream);
46
- (0, node_opcua_basic_types_1.encodeUInt32)(this.receiveBufferSize, stream);
47
- (0, node_opcua_basic_types_1.encodeUInt32)(this.sendBufferSize, stream);
48
- (0, node_opcua_basic_types_1.encodeUInt32)(this.maxMessageSize, stream);
49
- (0, node_opcua_basic_types_1.encodeUInt32)(this.maxChunkCount, stream);
50
- }
51
- decode(stream) {
52
- // call base class implementation first
53
- super.decode(stream);
54
- this.protocolVersion = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
55
- this.receiveBufferSize = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
56
- this.sendBufferSize = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
57
- this.maxMessageSize = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
58
- this.maxChunkCount = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
59
- }
60
- toString() {
61
- let str = "";
62
- str += "protocolVersion = " + this.protocolVersion + "\n";
63
- str += "receiveBufferSize = " + this.receiveBufferSize + "\n";
64
- str += "sendBufferSize = " + this.sendBufferSize + "\n";
65
- str += "maxMessageSize = " + this.maxMessageSize + "\n";
66
- str += "maxChunkCount = " + this.maxChunkCount + "\n";
67
- return str;
68
- }
69
- }
70
- exports.AcknowledgeMessage = AcknowledgeMessage;
71
- AcknowledgeMessage.possibleFields = [
72
- "protocolVersion",
73
- "receiveBufferSize",
74
- "sendBufferSize",
75
- "maxMessageSize",
76
- "maxChunkCount"
77
- ];
78
- AcknowledgeMessage.schema = schemaAcknowledgeMessage;
79
- //# sourceMappingURL=AcknowledgeMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AcknowledgeMessage.js","sourceRoot":"","sources":["../../source/AcknowledgeMessage.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mEAA4E;AAE5E,2DAO4B;AAE5B,MAAM,wBAAwB,GAAG,IAAA,wCAAmB,EAAC;IACjD,IAAI,EAAE,oBAAoB;IAE1B,QAAQ,EAAE,gBAAgB;IAE1B,MAAM,EAAE;QACJ;YACI,IAAI,EAAE,iBAAiB;YAEvB,SAAS,EAAE,QAAQ;YAEnB,aAAa,EAAE,wEAAwE;SAC1F;QACD,EAAE,IAAI,EAAE,mBA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IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1D,OAAO,GAAG,CAAC;IACf,CAAC;;AA5DL,gDA6DC;AA5DiB,iCAAc,GAAa;IACrC,iBAAiB;IACjB,mBAAmB;IACnB,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;CAClB,CAAC;AACY,yBAAM,GAAG,wBAAwB,CAAC"}
@@ -1,27 +0,0 @@
1
- /**
2
- * @module node-opcua-transport
3
- */
4
- import { UAString, UInt32 } from "node-opcua-basic-types";
5
- import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
6
- import { BaseUAObject } from "node-opcua-factory";
7
- export interface HelloMessageOptions {
8
- protocolVersion?: UInt32;
9
- receiveBufferSize?: UInt32;
10
- sendBufferSize?: UInt32;
11
- maxMessageSize?: UInt32;
12
- maxChunkCount?: UInt32;
13
- endpointUrl?: UAString;
14
- }
15
- export declare class HelloMessage extends BaseUAObject {
16
- static possibleFields: string[];
17
- protocolVersion: UInt32;
18
- receiveBufferSize: UInt32;
19
- sendBufferSize: UInt32;
20
- maxMessageSize: UInt32;
21
- maxChunkCount: UInt32;
22
- endpointUrl: UAString;
23
- constructor(options?: HelloMessageOptions);
24
- encode(stream: OutputBinaryStream): void;
25
- decode(stream: BinaryStream): void;
26
- toString(): string;
27
- }
@@ -1,95 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HelloMessage = void 0;
4
- /**
5
- * @module node-opcua-transport
6
- */
7
- const node_opcua_basic_types_1 = require("node-opcua-basic-types");
8
- const node_opcua_factory_1 = require("node-opcua-factory");
9
- const schemaHelloMessage = (0, node_opcua_factory_1.buildStructuredType)({
10
- name: "HelloMessage",
11
- baseType: "BaseUAObject",
12
- fields: [
13
- {
14
- name: "protocolVersion",
15
- fieldType: "UInt32",
16
- documentation: "The latest version of the OPC UA TCP protocol supported by the Client"
17
- },
18
- {
19
- name: "receiveBufferSize",
20
- fieldType: "UInt32",
21
- documentation: "The largest message that the sender can receive."
22
- },
23
- {
24
- name: "sendBufferSize",
25
- fieldType: "UInt32",
26
- documentation: "The largest message that the sender will send."
27
- },
28
- { name: "maxMessageSize", fieldType: "UInt32", documentation: "The maximum size for any response message." },
29
- {
30
- name: "maxChunkCount",
31
- fieldType: "UInt32",
32
- documentation: "The maximum number of chunks in any response message"
33
- },
34
- {
35
- name: "endpointUrl",
36
- fieldType: "String",
37
- documentation: "The URL of the Endpoint which the Client wished to connect to."
38
- }
39
- ]
40
- });
41
- class HelloMessage extends node_opcua_factory_1.BaseUAObject {
42
- constructor(options) {
43
- options = options || {};
44
- super();
45
- const schema = schemaHelloMessage;
46
- /* istanbul ignore next */
47
- if (node_opcua_factory_1.parameters.debugSchemaHelper) {
48
- (0, node_opcua_factory_1.check_options_correctness_against_schema)(this, schema, options);
49
- }
50
- this.protocolVersion = (0, node_opcua_factory_1.initialize_field)(schema.fields[0], options.protocolVersion);
51
- this.receiveBufferSize = (0, node_opcua_factory_1.initialize_field)(schema.fields[1], options.receiveBufferSize);
52
- this.sendBufferSize = (0, node_opcua_factory_1.initialize_field)(schema.fields[2], options.sendBufferSize);
53
- this.maxMessageSize = (0, node_opcua_factory_1.initialize_field)(schema.fields[3], options.maxMessageSize);
54
- this.maxChunkCount = (0, node_opcua_factory_1.initialize_field)(schema.fields[4], options.maxChunkCount);
55
- this.endpointUrl = (0, node_opcua_factory_1.initialize_field)(schema.fields[5], options.endpointUrl);
56
- }
57
- encode(stream) {
58
- super.encode(stream);
59
- (0, node_opcua_basic_types_1.encodeUInt32)(this.protocolVersion, stream);
60
- (0, node_opcua_basic_types_1.encodeUInt32)(this.receiveBufferSize, stream);
61
- (0, node_opcua_basic_types_1.encodeUInt32)(this.sendBufferSize, stream);
62
- (0, node_opcua_basic_types_1.encodeUInt32)(this.maxMessageSize, stream);
63
- (0, node_opcua_basic_types_1.encodeUInt32)(this.maxChunkCount, stream);
64
- (0, node_opcua_basic_types_1.encodeUAString)(this.endpointUrl, stream);
65
- }
66
- decode(stream) {
67
- super.decode(stream);
68
- this.protocolVersion = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
69
- this.receiveBufferSize = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
70
- this.sendBufferSize = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
71
- this.maxMessageSize = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
72
- this.maxChunkCount = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
73
- this.endpointUrl = (0, node_opcua_basic_types_1.decodeUAString)(stream);
74
- }
75
- toString() {
76
- let str = "";
77
- str += "protocolVersion = " + this.protocolVersion + "\n";
78
- str += "receiveBufferSize = " + this.receiveBufferSize + "\n";
79
- str += "sendBufferSize = " + this.sendBufferSize + "\n";
80
- str += "maxMessageSize = " + this.maxMessageSize + "\n";
81
- str += "maxChunkCount = " + this.maxChunkCount + "\n";
82
- str += "endpointUrl = " + this.endpointUrl + "\n";
83
- return str;
84
- }
85
- }
86
- exports.HelloMessage = HelloMessage;
87
- HelloMessage.possibleFields = [
88
- "protocolVersion",
89
- "receiveBufferSize",
90
- "sendBufferSize",
91
- "maxMessageSize",
92
- "maxChunkCount",
93
- "endpointUrl"
94
- ];
95
- //# sourceMappingURL=HelloMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HelloMessage.js","sourceRoot":"","sources":["../../source/HelloMessage.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mEAAsH;AAEtH,2DAM4B;AAE5B,MAAM,kBAAkB,GAAG,IAAA,wCAAmB,EAAC;IAC3C,IAAI,EAAE,cAAc;IAEpB,QAAQ,EAAE,cAAc;IAExB,MAAM,EAAE;QACJ;YACI,IAAI,EAAE,iBAAiB;YAEvB,SAAS,EAAE,QAAQ;YAEnB,aAAa,EAAE,uEAAuE;SACzF;QACD;YACI,IAAI,EAAE,mBAAmB;YAEzB,SAAS,EAAE,QAAQ;YAEnB,aAAa,EAAE,kDAAkD;SACpE;QACD;YACI,IAAI,EAAE,gBAAgB;Y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AAG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5D,GAAG,IAAI,sBAAsB,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9D,GAAG,IAAI,sBAAsB,GAAG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3D,GAAG,IAAI,sBAAsB,GAAG,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3D,GAAG,IAAI,sBAAsB,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1D,GAAG,IAAI,sBAAsB,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxD,OAAO,GAAG,CAAC;IACf,CAAC;;AA7DL,oCA8DC;AA7DiB,2BAAc,GAAa;IACrC,iBAAiB;IACjB,mBAAmB;IACnB,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,aAAa;CAChB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * @module node-opcua-transport
3
- */
4
- import { UAString } from "node-opcua-basic-types";
5
- import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
6
- import { BaseUAObject } from "node-opcua-factory";
7
- import { StatusCode } from "node-opcua-status-code";
8
- export declare class TCPErrorMessage extends BaseUAObject {
9
- static possibleFields: string[];
10
- statusCode: StatusCode;
11
- reason: UAString;
12
- constructor(options?: {
13
- statusCode?: StatusCode;
14
- reason?: string;
15
- });
16
- encode(stream: OutputBinaryStream): void;
17
- decode(stream: BinaryStream): void;
18
- }
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TCPErrorMessage = void 0;
4
- /**
5
- * @module node-opcua-transport
6
- */
7
- const node_opcua_basic_types_1 = require("node-opcua-basic-types");
8
- const node_opcua_factory_1 = require("node-opcua-factory");
9
- const node_opcua_status_code_1 = require("node-opcua-status-code");
10
- // TCP Error Message OPC Unified Architecture, Part 6 page 46
11
- // the server always close the connection after sending the TCPError message
12
- const schemaTCPErrorMessage = (0, node_opcua_factory_1.buildStructuredType)({
13
- name: "TCPErrorMessage",
14
- baseType: "BaseUAObject",
15
- fields: [
16
- { name: "statusCode", fieldType: "StatusCode" },
17
- { name: "reason", fieldType: "String" } // A more verbose description of the error.
18
- ]
19
- });
20
- class TCPErrorMessage extends node_opcua_factory_1.BaseUAObject {
21
- constructor(options) {
22
- options = options || {};
23
- const schema = schemaTCPErrorMessage;
24
- super();
25
- /* istanbul ignore next */
26
- if (node_opcua_factory_1.parameters.debugSchemaHelper) {
27
- (0, node_opcua_factory_1.check_options_correctness_against_schema)(this, schema, options);
28
- }
29
- this.statusCode = (0, node_opcua_factory_1.initialize_field)(schema.fields[0], options.statusCode);
30
- this.reason = (0, node_opcua_factory_1.initialize_field)(schema.fields[1], options.reason);
31
- }
32
- encode(stream) {
33
- // call base class implementation first
34
- super.encode(stream);
35
- (0, node_opcua_status_code_1.encodeStatusCode)(this.statusCode, stream);
36
- (0, node_opcua_basic_types_1.encodeString)(this.reason, stream);
37
- }
38
- decode(stream) {
39
- // call base class implementation first
40
- super.decode(stream);
41
- this.statusCode = (0, node_opcua_status_code_1.decodeStatusCode)(stream);
42
- this.reason = (0, node_opcua_basic_types_1.decodeString)(stream);
43
- }
44
- }
45
- exports.TCPErrorMessage = TCPErrorMessage;
46
- TCPErrorMessage.possibleFields = ["statusCode", "reason"];
47
- //# sourceMappingURL=TCPErrorMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TCPErrorMessage.js","sourceRoot":"","sources":["../../source/TCPErrorMessage.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mEAA8E;AAE9E,2DAM4B;AAC5B,mEAAwF;AAExF,8DAA8D;AAC9D,4EAA4E;AAC5E,MAAM,qBAAqB,GAAG,IAAA,wCAAmB,EAAC;IAC9C,IAAI,EAAE,iBAAiB;IAEvB,QAAQ,EAAE,cAAc;IAExB,MAAM,EAAE;QACJ,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,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
1
- /// <reference types="node" />
2
- import { ErrorCallback } from "node-opcua-status-code";
3
- import { TCP_transport } from "./tcp_transport";
4
- import { AcknowledgeMessage } from "./AcknowledgeMessage";
5
- export interface ClientTCP_transport {
6
- on(eventName: "chunk", eventHandler: (messageChunk: Buffer) => void): this;
7
- on(eventName: "socket_closed", eventHandler: (err: Error | null) => void): this;
8
- on(eventName: "close", eventHandler: (err: Error | null) => void): this;
9
- on(eventName: "connection_break", eventHandler: () => void): this;
10
- on(eventName: "connect", eventHandler: () => void): this;
11
- once(eventName: "chunk", eventHandler: (messageChunk: Buffer) => void): this;
12
- once(eventName: "socket_closed", eventHandler: (err: Error | null) => void): this;
13
- once(eventName: "close", eventHandler: (err: Error | null) => void): this;
14
- once(eventName: "connection_break", eventHandler: () => void): this;
15
- once(eventName: "connect", eventHandler: () => void): this;
16
- emit(eventName: "chunk", messageChunk: Buffer): boolean;
17
- emit(eventName: "socket_closed", err?: Error | null): boolean;
18
- emit(eventName: "close", err?: Error | null): boolean;
19
- emit(eventName: "connection_break"): boolean;
20
- emit(eventName: "connect"): boolean;
21
- }
22
- export interface TransportSettingsOptions {
23
- maxChunkCount?: number;
24
- maxMessageSize?: number;
25
- receiveBufferSize?: number;
26
- sendBufferSize?: number;
27
- }
28
- /**
29
- * a ClientTCP_transport connects to a remote server socket and
30
- * initiates a communication with a HEL/ACK transaction.
31
- * It negotiates the communication parameters with the other end.
32
- *
33
- * @class ClientTCP_transport
34
- * @extends TCP_transport
35
- * @constructor
36
- * @example
37
- *
38
- * ```javascript
39
- * const transport = ClientTCP_transport(url);
40
- *
41
- * transport.timeout = 10000;
42
- *
43
- * transport.connect(function(err)) {
44
- * if (err) {
45
- * // cannot connect
46
- * } else {
47
- * // connected
48
- *
49
- * }
50
- * });
51
- * ....
52
- *
53
- * transport.write(message_chunk,'F');
54
- *
55
- * ....
56
- *
57
- * transport.on("chunk",function(message_chunk) {
58
- * // do something with chunk from server...
59
- * });
60
- *
61
- *
62
- * ```
63
- *
64
- *
65
- */
66
- export declare class ClientTCP_transport extends TCP_transport {
67
- static defaultMaxChunk: number;
68
- static defaultMaxMessageSize: number;
69
- static defaultReceiveBufferSize: number;
70
- static defaultSendBufferSize: number;
71
- endpointUrl: string;
72
- serverUri: string;
73
- numberOfRetry: number;
74
- parameters?: AcknowledgeMessage;
75
- private connected;
76
- private _counter;
77
- private _helloSettings;
78
- constructor(transportSettings?: TransportSettingsOptions);
79
- getTransportSettings(): TransportSettingsOptions;
80
- dispose(): void;
81
- connect(endpointUrl: string, callback: ErrorCallback): void;
82
- protected on_socket_ended(err: Error | null): void;
83
- private _handle_ACK_response;
84
- private _send_HELLO_request;
85
- private _on_ACK_response;
86
- private _perform_HEL_ACK_transaction;
87
- }