Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
return filename;
}
const default_server_info = {
// The globally unique identifier for the application instance. This URI is used as
// ServerUri in Services if the application is a Server.
applicationUri: "urn:NodeOPCUA-Server-default",
// The globally unique identifier for the product.
productUri: "NodeOPCUA-Server",
// A localized descriptive name for the application.
applicationName: { text: "NodeOPCUA", locale: null },
applicationType: ApplicationType.Server,
gatewayServerUri: "",
discoveryProfileUri: "",
discoveryUrls: []
};
function cleanupEndpoint(endpoint: OPCUAServerEndPoint) {
if (endpoint._on_new_channel) {
assert(_.isFunction(endpoint._on_new_channel));
endpoint.removeListener("newChannel", endpoint._on_new_channel);
endpoint._on_new_channel = undefined;
}
if (endpoint._on_close_channel) {
function _isValidServerType(serverType: ApplicationType): boolean {
switch (serverType) {
case ApplicationType.Client:
return false;
case ApplicationType.Server:
case ApplicationType.ClientAndServer:
case ApplicationType.DiscoveryServer:
return true;
}
return false;
}