node-opcua-server 2.73.1 → 2.76.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 (72) hide show
  1. package/LICENSE +3 -1
  2. package/dist/base_server.d.ts +110 -110
  3. package/dist/base_server.js +473 -473
  4. package/dist/factory.d.ts +12 -12
  5. package/dist/factory.js +23 -23
  6. package/dist/filter/check_where_clause_on_address_space.d.ts +3 -0
  7. package/dist/filter/check_where_clause_on_address_space.js +23 -0
  8. package/dist/filter/check_where_clause_on_address_space.js.map +1 -0
  9. package/dist/filter/extract_event_fields.d.ts +10 -0
  10. package/dist/filter/extract_event_fields.js +18 -0
  11. package/dist/filter/extract_event_fields.js.map +1 -0
  12. package/dist/helper.d.ts +10 -10
  13. package/dist/helper.js +75 -75
  14. package/dist/history_server_capabilities.d.ts +35 -35
  15. package/dist/history_server_capabilities.js +43 -43
  16. package/dist/i_channel_data.d.ts +13 -13
  17. package/dist/i_channel_data.js +2 -2
  18. package/dist/i_register_server_manager.d.ts +16 -16
  19. package/dist/i_register_server_manager.js +2 -2
  20. package/dist/i_server_side_publish_engine.d.ts +36 -36
  21. package/dist/i_server_side_publish_engine.js +49 -49
  22. package/dist/i_socket_data.d.ts +11 -11
  23. package/dist/i_socket_data.js +2 -2
  24. package/dist/index.d.ts +16 -16
  25. package/dist/index.js +32 -32
  26. package/dist/monitored_item.d.ts +177 -177
  27. package/dist/monitored_item.js +1001 -999
  28. package/dist/monitored_item.js.map +1 -1
  29. package/dist/node_sampler.d.ts +3 -3
  30. package/dist/node_sampler.js +75 -75
  31. package/dist/opcua_server.d.ts +747 -650
  32. package/dist/opcua_server.js +2431 -2394
  33. package/dist/opcua_server.js.map +1 -1
  34. package/dist/queue.d.ts +11 -11
  35. package/dist/queue.js +71 -71
  36. package/dist/register_server_manager.d.ts +96 -96
  37. package/dist/register_server_manager.js +584 -584
  38. package/dist/register_server_manager_hidden.d.ts +17 -17
  39. package/dist/register_server_manager_hidden.js +27 -27
  40. package/dist/register_server_manager_mdns_only.d.ts +22 -22
  41. package/dist/register_server_manager_mdns_only.js +55 -55
  42. package/dist/server_capabilities.d.ts +148 -148
  43. package/dist/server_capabilities.js +92 -92
  44. package/dist/server_end_point.d.ts +183 -183
  45. package/dist/server_end_point.js +817 -817
  46. package/dist/server_engine.d.ts +317 -317
  47. package/dist/server_engine.js +1716 -1716
  48. package/dist/server_publish_engine.d.ts +113 -112
  49. package/dist/server_publish_engine.js +541 -535
  50. package/dist/server_publish_engine.js.map +1 -1
  51. package/dist/server_publish_engine_for_orphan_subscriptions.d.ts +16 -16
  52. package/dist/server_publish_engine_for_orphan_subscriptions.js +51 -51
  53. package/dist/server_session.d.ts +182 -182
  54. package/dist/server_session.js +739 -739
  55. package/dist/server_subscription.d.ts +421 -421
  56. package/dist/server_subscription.js +1346 -1345
  57. package/dist/server_subscription.js.map +1 -1
  58. package/dist/sessions_compatible_for_transfer.d.ts +2 -2
  59. package/dist/sessions_compatible_for_transfer.js +39 -39
  60. package/dist/user_manager.d.ts +32 -32
  61. package/dist/user_manager.js +74 -74
  62. package/dist/user_manager_ua.d.ts +3 -3
  63. package/dist/user_manager_ua.js +39 -39
  64. package/dist/validate_filter.d.ts +5 -5
  65. package/dist/validate_filter.js +60 -60
  66. package/package.json +50 -51
  67. package/source/filter/check_where_clause_on_address_space.ts +29 -0
  68. package/source/filter/extract_event_fields.ts +21 -0
  69. package/source/monitored_item.ts +5 -11
  70. package/source/opcua_server.ts +175 -36
  71. package/source/server_publish_engine.ts +24 -19
  72. package/source/server_subscription.ts +11 -10
@@ -1,93 +1,93 @@
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: 16 * 1024 * 1024,
25
- maxArrayLength: 1024 * 1024,
26
- maxByteStringLength: 16 * 1024 * 1024,
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 =
80
- options.maxSubscriptionsPerSession || exports.defaultServerCapabilities.maxSubscriptionsPerSession;
81
- this.maxSubscriptions = options.maxSubscriptions || exports.defaultServerCapabilities.maxSubscriptions;
82
- this.maxMonitoredItems = options.maxMonitoredItems || exports.defaultServerCapabilities.maxMonitoredItems;
83
- this.maxMonitoredItemsPerSubscription =
84
- options.maxMonitoredItemsPerSubscription || exports.defaultServerCapabilities.maxMonitoredItemsPerSubscription;
85
- this.maxSelectClauseParameters = options.maxSelectClauseParameters || exports.defaultServerCapabilities.maxSelectClauseParameters;
86
- this.maxWhereClauseParameters = options.maxWhereClauseParameters || exports.defaultServerCapabilities.maxWhereClauseParameters;
87
- this.maxMonitoredItemsQueueSize =
88
- options.maxMonitoredItemsQueueSize || exports.defaultServerCapabilities.maxMonitoredItemsQueueSize;
89
- this.conformanceUnits = options.conformanceUnits || exports.defaultServerCapabilities.conformanceUnits;
90
- }
91
- }
92
- 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: 16 * 1024 * 1024,
25
+ maxArrayLength: 1024 * 1024,
26
+ maxByteStringLength: 16 * 1024 * 1024,
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 =
80
+ options.maxSubscriptionsPerSession || exports.defaultServerCapabilities.maxSubscriptionsPerSession;
81
+ this.maxSubscriptions = options.maxSubscriptions || exports.defaultServerCapabilities.maxSubscriptions;
82
+ this.maxMonitoredItems = options.maxMonitoredItems || exports.defaultServerCapabilities.maxMonitoredItems;
83
+ this.maxMonitoredItemsPerSubscription =
84
+ options.maxMonitoredItemsPerSubscription || exports.defaultServerCapabilities.maxMonitoredItemsPerSubscription;
85
+ this.maxSelectClauseParameters = options.maxSelectClauseParameters || exports.defaultServerCapabilities.maxSelectClauseParameters;
86
+ this.maxWhereClauseParameters = options.maxWhereClauseParameters || exports.defaultServerCapabilities.maxWhereClauseParameters;
87
+ this.maxMonitoredItemsQueueSize =
88
+ options.maxMonitoredItemsQueueSize || exports.defaultServerCapabilities.maxMonitoredItemsQueueSize;
89
+ this.conformanceUnits = options.conformanceUnits || exports.defaultServerCapabilities.conformanceUnits;
90
+ }
91
+ }
92
+ exports.ServerCapabilities = ServerCapabilities;
93
93
  //# sourceMappingURL=server_capabilities.js.map
@@ -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
+ }