tls¶
Object: jstp.tls¶
jstp.tls.connect(app, client, ...args, callback)¶
app<string>|<Object>Application to connect to as'name'or'name@version'or{ name, version }, where version must be a valid semver range.client<Client>|<null>Optional, when omitted, an object with the default values forapplication,connectPolicyandreconnectoris used....args<any>Arguments passed directly totls.connect()(except forcallback)callback<Function>error:<Error>connection:<Connection>
jstp.tls.connectAndInspect(app, client, interfaces, ...args, callback)¶
app<string>|<Object>Application to connect to as'name'or'name@version'or{ name, version }, where version must be a valid semver range.client<Client>|<null>Optional, when omitted, an object with the default values forapplication,connectPolicyandreconnectoris used.interfaces<string[]>Interface names to perform inspect on....args<any>Arguments passed directly totls.connect()(except forcallback)callback<Function>error:<Error>connection:<Connection>proxies<Object>[interfaceName]<RemoteProxy>
For more details see jstp.net.connectAndInspect().
jstp.tls.reconnect(connection, ...args, callback)¶
connection:<Connection>...args<any>Arguments passed directly totls.connect()(except forcallback)callback<Function>error:<Error>connection:<Connection>
For more details see jstp.net.reconnect().
jstp.tls.createServer(options[, listener])¶
options<Object>|<Application[]>applications<Application[]>|MapApplications array or index obtained fromjstp.createAppsIndex().authPolicy<AuthPolicy>|<Function>If the function is provided, it is expected to have the same signature asAuthPolicy.authenticate().sessionStorageProvider<SessionStorageProvider>If provided, this is used to store sessions for applications that do not have its own storage provider. Defaults to usingSimpleSessionStorageProviderwith its default settings.heartbeatInterval<number>Omitting this option disables heartbeat.clientExpirationTime<number>Time it takes for client's connection and corresponding session cache, stored in memory after the connection is closed, to expire. Defaults to3600000(1 hour).
listener<Function>Automatically set as a listener for the'connect'event.
For additional options see documentation for
tls.createServer(). However, beware, some of the options
may interfere with the correct functioning of the JSTP protocol.
For more details see jstp.net.createServer()