node-opcua-server 2.71.0 → 2.72.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 (65) hide show
  1. package/dist/base_server.d.ts +110 -110
  2. package/dist/base_server.js +473 -473
  3. package/dist/factory.d.ts +12 -12
  4. package/dist/factory.js +23 -23
  5. package/dist/history_server_capabilities.d.ts +35 -35
  6. package/dist/history_server_capabilities.js +43 -43
  7. package/dist/i_channel_data.d.ts +13 -13
  8. package/dist/i_channel_data.js +2 -2
  9. package/dist/i_register_server_manager.d.ts +16 -16
  10. package/dist/i_register_server_manager.js +2 -2
  11. package/dist/i_server_side_publish_engine.d.ts +36 -36
  12. package/dist/i_server_side_publish_engine.js +49 -49
  13. package/dist/i_socket_data.d.ts +11 -11
  14. package/dist/i_socket_data.js +2 -2
  15. package/dist/index.d.ts +15 -15
  16. package/dist/index.js +31 -31
  17. package/dist/monitored_item.d.ts +177 -177
  18. package/dist/monitored_item.js +998 -998
  19. package/dist/node_sampler.d.ts +3 -3
  20. package/dist/node_sampler.js +75 -75
  21. package/dist/opcua_server.d.ts +650 -647
  22. package/dist/opcua_server.js +2392 -2385
  23. package/dist/opcua_server.js.map +1 -1
  24. package/dist/queue.d.ts +11 -11
  25. package/dist/queue.js +71 -71
  26. package/dist/register_server_manager.d.ts +96 -96
  27. package/dist/register_server_manager.js +584 -584
  28. package/dist/register_server_manager_hidden.d.ts +17 -17
  29. package/dist/register_server_manager_hidden.js +27 -27
  30. package/dist/register_server_manager_mdns_only.d.ts +22 -22
  31. package/dist/register_server_manager_mdns_only.js +55 -55
  32. package/dist/server_capabilities.d.ts +148 -61
  33. package/dist/server_capabilities.js +91 -108
  34. package/dist/server_capabilities.js.map +1 -1
  35. package/dist/server_end_point.d.ts +183 -183
  36. package/dist/server_end_point.js +817 -816
  37. package/dist/server_end_point.js.map +1 -1
  38. package/dist/server_engine.d.ts +317 -316
  39. package/dist/server_engine.js +1716 -1688
  40. package/dist/server_engine.js.map +1 -1
  41. package/dist/server_publish_engine.d.ts +112 -112
  42. package/dist/server_publish_engine.js +530 -530
  43. package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
  44. package/dist/server_publish_engine_for_orphan_subscriptions.js +49 -49
  45. package/dist/server_session.d.ts +181 -181
  46. package/dist/server_session.js +738 -738
  47. package/dist/server_session.js.map +1 -1
  48. package/dist/server_subscription.d.ts +415 -395
  49. package/dist/server_subscription.js +1334 -1316
  50. package/dist/server_subscription.js.map +1 -1
  51. package/dist/sessions_compatible_for_transfer.d.ts +2 -2
  52. package/dist/sessions_compatible_for_transfer.js +36 -36
  53. package/dist/user_manager.d.ts +32 -32
  54. package/dist/user_manager.js +74 -74
  55. package/dist/user_manager_ua.d.ts +3 -3
  56. package/dist/user_manager_ua.js +39 -39
  57. package/dist/validate_filter.d.ts +5 -5
  58. package/dist/validate_filter.js +60 -60
  59. package/package.json +26 -26
  60. package/source/opcua_server.ts +27 -16
  61. package/source/server_capabilities.ts +178 -91
  62. package/source/server_end_point.ts +9 -8
  63. package/source/server_engine.ts +30 -1
  64. package/source/server_session.ts +1 -0
  65. package/source/server_subscription.ts +46 -5
@@ -1,109 +1,92 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServerCapabilities = exports.OperationLimits = void 0;
4
- class OperationLimits {
5
- constructor(options) {
6
- /**
7
- * @property maxNodesPerRead
8
- * @default 0
9
- */
10
- this.maxNodesPerRead = options.maxNodesPerRead || 0;
11
- /**
12
- * @property maxNodesPerWrite
13
- * @default 0
14
- */
15
- this.maxNodesPerWrite = options.maxNodesPerWrite || 0;
16
- /**
17
- * @property maxNodesPerMethodCall
18
- * @default 0
19
- */
20
- this.maxNodesPerMethodCall = options.maxNodesPerMethodCall || 0;
21
- /**
22
- * @property maxNodesPerBrowse
23
- * @default 0
24
- */
25
- this.maxNodesPerBrowse = options.maxNodesPerBrowse || 0;
26
- /**
27
- * @property maxNodesPerRegisterNodes
28
- * @default 0
29
- */
30
- this.maxNodesPerRegisterNodes = options.maxNodesPerRegisterNodes || 0;
31
- /**
32
- * @property maxNodesPerNodeManagement
33
- * @default 0
34
- */
35
- this.maxNodesPerNodeManagement = options.maxNodesPerNodeManagement || 0;
36
- /**
37
- * @property maxMonitoredItemsPerCall
38
- * @default 0
39
- */
40
- this.maxMonitoredItemsPerCall = options.maxMonitoredItemsPerCall || 0;
41
- /**
42
- * @property maxNodesPerHistoryReadData
43
- */
44
- this.maxNodesPerHistoryReadData = options.maxNodesPerHistoryReadData || 0;
45
- /**
46
- * @property maxNodesPerHistoryReadEvents
47
- * @default 0
48
- */
49
- this.maxNodesPerHistoryReadEvents = options.maxNodesPerHistoryReadEvents || 0;
50
- /**
51
- * @property maxNodesPerHistoryUpdateData
52
- * @default 0
53
- */
54
- this.maxNodesPerHistoryUpdateData = options.maxNodesPerHistoryUpdateData || 0;
55
- /**
56
- * @property maxNodesPerHistoryUpdateEvents
57
- * @default 0
58
- */
59
- this.maxNodesPerHistoryUpdateEvents = options.maxNodesPerHistoryUpdateEvents || 0;
60
- /**
61
- * @property maxNodesPerTranslateBrowsePathsToNodeIds
62
- * @default 0
63
- */
64
- this.maxNodesPerTranslateBrowsePathsToNodeIds = options.maxNodesPerTranslateBrowsePathsToNodeIds || 0;
65
- }
66
- }
67
- exports.OperationLimits = OperationLimits;
68
- /**
69
- */
70
- class ServerCapabilities {
71
- constructor(options) {
72
- options = options || {};
73
- options.operationLimits = options.operationLimits || {};
74
- this.serverProfileArray = options.serverProfileArray || [];
75
- this.localeIdArray = options.localeIdArray || [];
76
- this.softwareCertificates = options.softwareCertificates || [];
77
- /**
78
- * @property maxArrayLength
79
- */
80
- this.maxArrayLength = options.maxArrayLength || 0;
81
- /**
82
- * @property maxStringLength
83
- */
84
- this.maxStringLength = options.maxStringLength || 0;
85
- /**
86
- * @property maxByteStringLength
87
- */
88
- this.maxByteStringLength = options.maxByteStringLength || 0;
89
- /**
90
- * @property maxBrowseContinuationPoints
91
- */
92
- this.maxBrowseContinuationPoints = options.maxBrowseContinuationPoints || 0;
93
- /**
94
- * @property maxQueryContinuationPoints
95
- */
96
- this.maxQueryContinuationPoints = options.maxQueryContinuationPoints || 0;
97
- /**
98
- * @property maxHistoryContinuationPoints
99
- */
100
- this.maxHistoryContinuationPoints = options.maxHistoryContinuationPoints || 0;
101
- /**
102
- * @property operationLimits
103
- */
104
- this.operationLimits = new OperationLimits(options.operationLimits);
105
- this.minSupportedSampleRate = 100; // to do adjust me
106
- }
107
- }
108
- exports.ServerCapabilities = ServerCapabilities;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServerCapabilities = exports.defaultServerCapabilities = exports.OperationLimits = void 0;
4
+ class OperationLimits {
5
+ constructor(options) {
6
+ this.maxNodesPerRead = options.maxNodesPerRead || 0;
7
+ this.maxNodesPerWrite = options.maxNodesPerWrite || 0;
8
+ this.maxNodesPerMethodCall = options.maxNodesPerMethodCall || 0;
9
+ this.maxNodesPerBrowse = options.maxNodesPerBrowse || 0;
10
+ this.maxNodesPerRegisterNodes = options.maxNodesPerRegisterNodes || 0;
11
+ this.maxNodesPerNodeManagement = options.maxNodesPerNodeManagement || 0;
12
+ this.maxMonitoredItemsPerCall = options.maxMonitoredItemsPerCall || 0;
13
+ this.maxNodesPerHistoryReadData = options.maxNodesPerHistoryReadData || 0;
14
+ this.maxNodesPerHistoryReadEvents = options.maxNodesPerHistoryReadEvents || 0;
15
+ this.maxNodesPerHistoryUpdateData = options.maxNodesPerHistoryUpdateData || 0;
16
+ this.maxNodesPerHistoryUpdateEvents = options.maxNodesPerHistoryUpdateEvents || 0;
17
+ this.maxNodesPerTranslateBrowsePathsToNodeIds = options.maxNodesPerTranslateBrowsePathsToNodeIds || 0;
18
+ }
19
+ }
20
+ exports.OperationLimits = OperationLimits;
21
+ exports.defaultServerCapabilities = {
22
+ maxBrowseContinuationPoints: 0,
23
+ maxHistoryContinuationPoints: 0,
24
+ maxStringLength: 65535,
25
+ maxArrayLength: 65535,
26
+ maxByteStringLength: 65535,
27
+ maxQueryContinuationPoints: 0,
28
+ minSupportedSampleRate: 100,
29
+ operationLimits: {
30
+ maxNodesPerBrowse: 0,
31
+ maxNodesPerHistoryReadData: 0,
32
+ maxNodesPerHistoryReadEvents: 0,
33
+ maxNodesPerHistoryUpdateData: 0,
34
+ maxNodesPerHistoryUpdateEvents: 0,
35
+ maxNodesPerMethodCall: 0,
36
+ maxNodesPerNodeManagement: 0,
37
+ maxNodesPerRead: 0,
38
+ maxNodesPerRegisterNodes: 0,
39
+ maxNodesPerWrite: 0,
40
+ maxNodesPerTranslateBrowsePathsToNodeIds: 0,
41
+ maxMonitoredItemsPerCall: 0
42
+ },
43
+ serverProfileArray: [],
44
+ localeIdArray: [],
45
+ softwareCertificates: [],
46
+ maxSessions: 10,
47
+ maxSubscriptions: 100,
48
+ maxMonitoredItems: 1000000,
49
+ maxSubscriptionsPerSession: 10,
50
+ maxMonitoredItemsPerSubscription: 100000,
51
+ maxSelectClauseParameters: 100,
52
+ maxWhereClauseParameters: 100,
53
+ maxMonitoredItemsQueueSize: 60000,
54
+ conformanceUnits: []
55
+ };
56
+ /**
57
+ */
58
+ class ServerCapabilities {
59
+ // eslint-disable-next-line complexity
60
+ constructor(options) {
61
+ options = options || {};
62
+ options.operationLimits = options.operationLimits || {};
63
+ this.serverProfileArray = options.serverProfileArray || [];
64
+ this.localeIdArray = options.localeIdArray || [];
65
+ this.softwareCertificates = options.softwareCertificates || [];
66
+ this.maxArrayLength = options.maxArrayLength || exports.defaultServerCapabilities.maxArrayLength;
67
+ this.maxStringLength = options.maxStringLength || exports.defaultServerCapabilities.maxStringLength;
68
+ this.maxByteStringLength = options.maxByteStringLength || exports.defaultServerCapabilities.maxByteStringLength;
69
+ this.maxBrowseContinuationPoints =
70
+ options.maxBrowseContinuationPoints || exports.defaultServerCapabilities.maxBrowseContinuationPoints;
71
+ this.maxQueryContinuationPoints =
72
+ options.maxQueryContinuationPoints || exports.defaultServerCapabilities.maxQueryContinuationPoints;
73
+ this.maxHistoryContinuationPoints =
74
+ options.maxHistoryContinuationPoints || exports.defaultServerCapabilities.maxHistoryContinuationPoints;
75
+ this.operationLimits = new OperationLimits(options.operationLimits);
76
+ this.minSupportedSampleRate = options.minSupportedSampleRate || exports.defaultServerCapabilities.minSupportedSampleRate; // to do adjust me
77
+ // new in 1.05
78
+ this.maxSessions = options.maxSessions || exports.defaultServerCapabilities.maxSessions;
79
+ this.maxSubscriptionsPerSession = options.maxSubscriptionsPerSession || exports.defaultServerCapabilities.maxSubscriptionsPerSession;
80
+ this.maxSubscriptions = options.maxSubscriptions || exports.defaultServerCapabilities.maxSubscriptions;
81
+ this.maxMonitoredItems = options.maxMonitoredItems || exports.defaultServerCapabilities.maxMonitoredItems;
82
+ this.maxMonitoredItemsPerSubscription =
83
+ options.maxMonitoredItemsPerSubscription || exports.defaultServerCapabilities.maxMonitoredItemsPerSubscription;
84
+ this.maxSelectClauseParameters = options.maxSelectClauseParameters || exports.defaultServerCapabilities.maxSelectClauseParameters;
85
+ this.maxWhereClauseParameters = options.maxWhereClauseParameters || exports.defaultServerCapabilities.maxWhereClauseParameters;
86
+ this.maxMonitoredItemsQueueSize =
87
+ options.maxMonitoredItemsQueueSize || exports.defaultServerCapabilities.maxMonitoredItemsQueueSize;
88
+ this.conformanceUnits = options.conformanceUnits || exports.defaultServerCapabilities.conformanceUnits;
89
+ }
90
+ }
91
+ exports.ServerCapabilities = ServerCapabilities;
109
92
  //# sourceMappingURL=server_capabilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server_capabilities.js","sourceRoot":"","sources":["../source/server_capabilities.ts"],"names":[],"mappings":";;;AAwBA,MAAa,eAAe;IAcxB,YAAY,OAA+B;QACvC;;;WAGG;QACH,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,IAAI,CAAC,CAAC;QACpD;;;WAGG;QACH,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB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;QAEpI,cAAc;QACd,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,iCAAyB,CAAC,WAAW,CAAC;QAEhF,IAAI,CAAC,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,IAAI,iCAAyB,CAAC,0BAA0B,CAAC;QAC7H,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAAI,iCAAyB,CAAC,gBAAgB,CAAC;QAC/F,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,IAAI,iCAAyB,CAAC,iBAAiB,CAAC;QAClG,IAAI,CAAC,gCAAgC;YACjC,OAAO,CAAC,gCAAgC,IAAI,iCAAyB,CAAC,gCAAgC,CAAC;QAC3G,IAAI,CAAC,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,IAAI,iCAAyB,CAAC,yBAAyB,CAAC;QAC1H,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,wBAAwB,IAAI,iCAAyB,CAAC,wBAAwB,CAAC;QACvH,IAAI,CAAC,0BAA0B;YAC3B,OAAO,CAAC,0BAA0B,IAAI,iCAAyB,CAAC,0BAA0B,CAAC;QAC/F,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAAI,iCAAyB,CAAC,gBAAgB,CAAC;IACnG,CAAC;CACJ;AA9DD,gDA8DC"}
@@ -1,183 +1,183 @@
1
- /// <reference types="node" />
2
- /**
3
- * @module node-opcua-server
4
- */
5
- import { EventEmitter } from "events";
6
- import { OPCUACertificateManager } from "node-opcua-certificate-manager";
7
- import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
8
- import { MessageSecurityMode, SecurityPolicy, ServerSecureChannelLayer, ServerSecureChannelParent } from "node-opcua-secure-channel";
9
- import { EndpointDescription } from "node-opcua-service-endpoints";
10
- import { ApplicationDescription } from "node-opcua-service-endpoints";
11
- export interface OPCUAServerEndPointOptions {
12
- /**
13
- * the tcp port
14
- */
15
- port: number;
16
- /**
17
- * the DER certificate chain
18
- */
19
- certificateChain: Certificate;
20
- /**
21
- * privateKey
22
- */
23
- privateKey: PrivateKeyPEM;
24
- certificateManager: OPCUACertificateManager;
25
- /**
26
- * the default secureToken lifetime @default=60000
27
- */
28
- defaultSecureTokenLifetime?: number;
29
- /**
30
- * the maximum number of connection allowed on the TCP server socket
31
- * @default 20
32
- */
33
- maxConnections?: number;
34
- /**
35
- * the timeout for the TCP HEL/ACK transaction (in ms)
36
- * @default 30000
37
- */
38
- timeout?: number;
39
- serverInfo: ApplicationDescription;
40
- objectFactory?: any;
41
- }
42
- export interface EndpointDescriptionParams {
43
- allowAnonymous?: boolean;
44
- restricted?: boolean;
45
- allowUnsecurePassword?: boolean;
46
- resourcePath?: string;
47
- alternateHostname?: string[];
48
- hostname: string;
49
- securityPolicies: SecurityPolicy[];
50
- }
51
- export interface AddStandardEndpointDescriptionsParam {
52
- securityModes?: MessageSecurityMode[];
53
- securityPolicies?: SecurityPolicy[];
54
- disableDiscovery?: boolean;
55
- allowAnonymous?: boolean;
56
- restricted?: boolean;
57
- hostname?: string;
58
- alternateHostname?: string[];
59
- allowUnsecurePassword?: boolean;
60
- resourcePath?: string;
61
- }
62
- /**
63
- * OPCUAServerEndPoint a Server EndPoint.
64
- * A sever end point is listening to one port
65
- * note:
66
- * see OPCUA Release 1.03 part 4 page 108 7.1 ApplicationDescription
67
- */
68
- export declare class OPCUAServerEndPoint extends EventEmitter implements ServerSecureChannelParent {
69
- /**
70
- * the tcp port
71
- */
72
- port: number;
73
- certificateManager: OPCUACertificateManager;
74
- defaultSecureTokenLifetime: number;
75
- maxConnections: number;
76
- timeout: number;
77
- bytesWrittenInOldChannels: number;
78
- bytesReadInOldChannels: number;
79
- transactionsCountOldChannels: number;
80
- securityTokenCountOldChannels: number;
81
- serverInfo: ApplicationDescription;
82
- objectFactory: any;
83
- _on_new_channel?: (channel: ServerSecureChannelLayer) => void;
84
- _on_close_channel?: (channel: ServerSecureChannelLayer) => void;
85
- _on_connectionRefused?: (socketData: any) => void;
86
- _on_openSecureChannelFailure?: (socketData: any, channelData: any) => void;
87
- private _certificateChain;
88
- private _privateKey;
89
- private _channels;
90
- private _server?;
91
- private _endpoints;
92
- private _listen_callback?;
93
- private _started;
94
- private _counter;
95
- private _policy_deduplicator;
96
- constructor(options: OPCUAServerEndPointOptions);
97
- dispose(): void;
98
- toString(): string;
99
- getChannels(): ServerSecureChannelLayer[];
100
- /**
101
- * Returns the X509 DER form of the server certificate
102
- */
103
- getCertificate(): Certificate;
104
- /**
105
- * Returns the X509 DER form of the server certificate
106
- */
107
- getCertificateChain(): Certificate;
108
- /**
109
- * the private key
110
- */
111
- getPrivateKey(): PrivateKeyPEM;
112
- /**
113
- * The number of active channel on this end point.
114
- */
115
- get currentChannelCount(): number;
116
- /**
117
- * @method getEndpointDescription
118
- * @param securityMode
119
- * @param securityPolicy
120
- * @return endpoint_description {EndpointDescription|null}
121
- */
122
- getEndpointDescription(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, endpointUrl: string | null): EndpointDescription | null;
123
- addEndpointDescription(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, options?: EndpointDescriptionParams): void;
124
- addRestrictedEndpointDescription(options: EndpointDescriptionParams): void;
125
- addStandardEndpointDescriptions(options?: AddStandardEndpointDescriptionsParam): void;
126
- /**
127
- * returns the list of end point descriptions.
128
- */
129
- endpointDescriptions(): EndpointDescription[];
130
- /**
131
- * @method listen
132
- * @async
133
- */
134
- listen(callback: (err?: Error) => void): void;
135
- killClientSockets(callback: (err?: Error) => void): void;
136
- suspendConnection(callback: (err?: Error) => void): void;
137
- restoreConnection(callback: (err?: Error) => void): void;
138
- abruptlyInterruptChannels(): void;
139
- /**
140
- * @method shutdown
141
- * @async
142
- */
143
- shutdown(callback: (err?: Error) => void): void;
144
- /**
145
- * @method start
146
- * @async
147
- * @param callback
148
- */
149
- start(callback: (err?: Error) => void): void;
150
- get bytesWritten(): number;
151
- get bytesRead(): number;
152
- get transactionsCount(): number;
153
- get securityTokenCount(): number;
154
- get activeChannelCount(): number;
155
- private _dump_statistics;
156
- private _setup_server;
157
- private _on_client_connection;
158
- private _preregisterChannel;
159
- private _un_pre_registerChannel;
160
- /**
161
- * @method _registerChannel
162
- * @param channel
163
- * @private
164
- */
165
- private _registerChannel;
166
- /**
167
- * @method _unregisterChannel
168
- * @param channel
169
- * @private
170
- */
171
- private _unregisterChannel;
172
- private _end_listen;
173
- /**
174
- * shutdown_channel
175
- * @param channel
176
- * @param inner_callback
177
- */
178
- private shutdown_channel;
179
- /**
180
- * @private
181
- */
182
- private _prevent_DDOS_Attack;
183
- }
1
+ /// <reference types="node" />
2
+ /**
3
+ * @module node-opcua-server
4
+ */
5
+ import { EventEmitter } from "events";
6
+ import { OPCUACertificateManager } from "node-opcua-certificate-manager";
7
+ import { Certificate, PrivateKeyPEM } from "node-opcua-crypto";
8
+ import { MessageSecurityMode, SecurityPolicy, ServerSecureChannelLayer, ServerSecureChannelParent } from "node-opcua-secure-channel";
9
+ import { EndpointDescription } from "node-opcua-service-endpoints";
10
+ import { ApplicationDescription } from "node-opcua-service-endpoints";
11
+ export interface OPCUAServerEndPointOptions {
12
+ /**
13
+ * the tcp port
14
+ */
15
+ port: number;
16
+ /**
17
+ * the DER certificate chain
18
+ */
19
+ certificateChain: Certificate;
20
+ /**
21
+ * privateKey
22
+ */
23
+ privateKey: PrivateKeyPEM;
24
+ certificateManager: OPCUACertificateManager;
25
+ /**
26
+ * the default secureToken lifetime @default=60000
27
+ */
28
+ defaultSecureTokenLifetime?: number;
29
+ /**
30
+ * the maximum number of connection allowed on the TCP server socket
31
+ * @default 20
32
+ */
33
+ maxConnections?: number;
34
+ /**
35
+ * the timeout for the TCP HEL/ACK transaction (in ms)
36
+ * @default 30000
37
+ */
38
+ timeout?: number;
39
+ serverInfo: ApplicationDescription;
40
+ objectFactory?: any;
41
+ }
42
+ export interface EndpointDescriptionParams {
43
+ allowAnonymous?: boolean;
44
+ restricted?: boolean;
45
+ allowUnsecurePassword?: boolean;
46
+ resourcePath?: string;
47
+ alternateHostname?: string[];
48
+ hostname: string;
49
+ securityPolicies: SecurityPolicy[];
50
+ }
51
+ export interface AddStandardEndpointDescriptionsParam {
52
+ securityModes?: MessageSecurityMode[];
53
+ securityPolicies?: SecurityPolicy[];
54
+ disableDiscovery?: boolean;
55
+ allowAnonymous?: boolean;
56
+ restricted?: boolean;
57
+ hostname?: string;
58
+ alternateHostname?: string[];
59
+ allowUnsecurePassword?: boolean;
60
+ resourcePath?: string;
61
+ }
62
+ /**
63
+ * OPCUAServerEndPoint a Server EndPoint.
64
+ * A sever end point is listening to one port
65
+ * note:
66
+ * see OPCUA Release 1.03 part 4 page 108 7.1 ApplicationDescription
67
+ */
68
+ export declare class OPCUAServerEndPoint extends EventEmitter implements ServerSecureChannelParent {
69
+ /**
70
+ * the tcp port
71
+ */
72
+ port: number;
73
+ certificateManager: OPCUACertificateManager;
74
+ defaultSecureTokenLifetime: number;
75
+ maxConnections: number;
76
+ timeout: number;
77
+ bytesWrittenInOldChannels: number;
78
+ bytesReadInOldChannels: number;
79
+ transactionsCountOldChannels: number;
80
+ securityTokenCountOldChannels: number;
81
+ serverInfo: ApplicationDescription;
82
+ objectFactory: any;
83
+ _on_new_channel?: (channel: ServerSecureChannelLayer) => void;
84
+ _on_close_channel?: (channel: ServerSecureChannelLayer) => void;
85
+ _on_connectionRefused?: (socketData: any) => void;
86
+ _on_openSecureChannelFailure?: (socketData: any, channelData: any) => void;
87
+ private _certificateChain;
88
+ private _privateKey;
89
+ private _channels;
90
+ private _server?;
91
+ private _endpoints;
92
+ private _listen_callback?;
93
+ private _started;
94
+ private _counter;
95
+ private _policy_deduplicator;
96
+ constructor(options: OPCUAServerEndPointOptions);
97
+ dispose(): void;
98
+ toString(): string;
99
+ getChannels(): ServerSecureChannelLayer[];
100
+ /**
101
+ * Returns the X509 DER form of the server certificate
102
+ */
103
+ getCertificate(): Certificate;
104
+ /**
105
+ * Returns the X509 DER form of the server certificate
106
+ */
107
+ getCertificateChain(): Certificate;
108
+ /**
109
+ * the private key
110
+ */
111
+ getPrivateKey(): PrivateKeyPEM;
112
+ /**
113
+ * The number of active channel on this end point.
114
+ */
115
+ get currentChannelCount(): number;
116
+ /**
117
+ * @method getEndpointDescription
118
+ * @param securityMode
119
+ * @param securityPolicy
120
+ * @return endpoint_description {EndpointDescription|null}
121
+ */
122
+ getEndpointDescription(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, endpointUrl: string | null): EndpointDescription | null;
123
+ addEndpointDescription(securityMode: MessageSecurityMode, securityPolicy: SecurityPolicy, options?: EndpointDescriptionParams): void;
124
+ addRestrictedEndpointDescription(options: EndpointDescriptionParams): void;
125
+ addStandardEndpointDescriptions(options?: AddStandardEndpointDescriptionsParam): void;
126
+ /**
127
+ * returns the list of end point descriptions.
128
+ */
129
+ endpointDescriptions(): EndpointDescription[];
130
+ /**
131
+ * @method listen
132
+ * @async
133
+ */
134
+ listen(callback: (err?: Error) => void): void;
135
+ killClientSockets(callback: (err?: Error) => void): void;
136
+ suspendConnection(callback: (err?: Error) => void): void;
137
+ restoreConnection(callback: (err?: Error) => void): void;
138
+ abruptlyInterruptChannels(): void;
139
+ /**
140
+ * @method shutdown
141
+ * @async
142
+ */
143
+ shutdown(callback: (err?: Error) => void): void;
144
+ /**
145
+ * @method start
146
+ * @async
147
+ * @param callback
148
+ */
149
+ start(callback: (err?: Error) => void): void;
150
+ get bytesWritten(): number;
151
+ get bytesRead(): number;
152
+ get transactionsCount(): number;
153
+ get securityTokenCount(): number;
154
+ get activeChannelCount(): number;
155
+ private _dump_statistics;
156
+ private _setup_server;
157
+ private _on_client_connection;
158
+ private _preregisterChannel;
159
+ private _un_pre_registerChannel;
160
+ /**
161
+ * @method _registerChannel
162
+ * @param channel
163
+ * @private
164
+ */
165
+ private _registerChannel;
166
+ /**
167
+ * @method _unregisterChannel
168
+ * @param channel
169
+ * @private
170
+ */
171
+ private _unregisterChannel;
172
+ private _end_listen;
173
+ /**
174
+ * shutdown_channel
175
+ * @param channel
176
+ * @param inner_callback
177
+ */
178
+ private shutdown_channel;
179
+ /**
180
+ * @private
181
+ */
182
+ private _prevent_DDOS_Attack;
183
+ }