API Docs for: 0.1.0
Show:

vortex Class

Module: vortex

Vortex connector

Use this class to create a Vortex connection:

new vortex({
    host: '127.0.0.1',
    port: 8081,
    listener: {
        update: function(event) {
            console.clear();
            eval(event.body);
        }
    }
});

The following configuration options are available:

host String
IP or Hostname to connect to. Default 127.0.0.1.

port Integer
Port to use. Default 8081.

debug Boolean
Enable debug messages. Default false.

autoConnect Boolean
Connect upon creation without using the connect command. Default true.

autoReconnect Boolean
Automatically reconnect when connection is lost. Default true.

listener Object
Event listeners. The supported events are connect, disconnect, update, error.

Constructor

vortex

(
  • config
)

Parameters:

  • config Object

Item Index

Properties

Methods

_log

(
  • msg
)
private

Log message

Parameters:

  • msg String

    Message

connect

()

Connect to Vortex server

disconnect

()

Disconnect from Vortex server

isConnected

() Boolean

Returns the connection status

Returns:

Boolean: True when a connection is open

Properties

_browser

VortexBrowser private

Crossbrowser library

_client

VortexClient private

Vortex client

_config

Object private

Configuration object