SimpleConnectPolicy¶
Class: jstp.SimpleConnectPolicy¶
Simple generic connection provider. Used for client-side connection. Sends handshake with login/password or session ID if provided, otherwise sends anonymous handshake. You are free to implement whatever suits your needs instead.
simpleConnectPolicy.connect(app, connection[, session], callback)¶
app
<string>
|<Object>
application to connect to as'name'
or'name@version'
or{ name, version }
, where version must be a valid semver range.connection
<Connection>
session
<Session>
callback
<Function>
error
<Error>
|<null>
connection
Connection
Should send handshake message with appropriate credentials. You can get client
object provided upon connection creation with connection.client
.