diff --git a/lib/client/client_secure_channel_layer.js b/lib/client/client_secure_channel_layer.js index 4ece99e08d..a8b9942f37 100644 --- a/lib/client/client_secure_channel_layer.js +++ b/lib/client/client_secure_channel_layer.js @@ -133,6 +133,7 @@ function _on_message_received(response, msgType, requestId) { var g_channelId = 0; + /** * a ClientSecureChannelLayer represents the client side of the OPCUA secure channel. * @class ClientSecureChannelLayer @@ -146,14 +147,14 @@ var g_channelId = 0; * @param [options.serverCertificate=null] the serverCertificate (required if securityMode!=None) * @param options.parent {OPCUAClientBase} parent * @param [options.factory] an factory that provides a method createObjectId(id) for the message builder - * @param [options.transportTimeout = 10000 = 10 seconds] the transport timeout interval in ms + * @param [options.transportTimeout = ClientSecureChannelLayer.defaultTransportTimeout = 10 seconds] the transport timeout interval in ms * @param [options.connectionStrategy] {Object} * @param [options.connectionStrategy.maxRetry = 10] * @param [options.connectionStrategy.initialDelay = 10] * @param [options.connectionStrategy.maxDelay = 10000] * @constructor */ -var ClientSecureChannelLayer = function (options) { +function ClientSecureChannelLayer(options) { options = options || {}; @@ -221,7 +222,7 @@ var ClientSecureChannelLayer = function (options) { self._timedout_request_count = 0; - self.transportTimeout = options.transportTimeout || 10000; + self.transportTimeout = options.transportTimeout || ClientSecureChannelLayer.defaultTransportTimeout; self.channelId = g_channelId; g_channelId += 1; @@ -239,6 +240,8 @@ var ClientSecureChannelLayer = function (options) { }; util.inherits(ClientSecureChannelLayer, EventEmitter); +ClientSecureChannelLayer.defaultTransportTimeout = 10 * 1000; // 1 minute + /** * @method getPrivateKey * @return {Buffer} the privateKey