Connection
Connect to a remote server.
new Connection(options)
new Connection(options)
Create a server to be able to connect remotely.
Parameter | Default | Description |
---|---|---|
options | Object (optional) Connection options. | |
options.address | String The address of the server to connect to. | |
options.authorization | String Your authorization settings to authenticate yourself on the server side. | |
options.authorization.username | String Username in the list of users specified in the server option. | |
options.authorization.password | String Password in the list of users specified in the server option. | |
options.auto_reconnect |
| Boolean (optional) Whether to auto-reconnect when disconnected. |
options.auto_reconnect_interval |
| Number (optional) Interval of seconds it will try to reconnect after disconnection. |
Example:
Last updated