Class: Client

Client(config)

new Client(config)

Instantiate an elarian client. You have to call connect() on then client to start using it

Parameters:
Name Type Description
config ClientConfig
Source:

Methods

connect() → {Elarian}

Connecto to elarian servers

Source:
Returns:

this instance

Type
Elarian

disconnect()

Disconnect from the elarian server

Source:

isConnected() → {boolean}

Check if client is connected

Source:
Returns:
Type
boolean

on(event, handler) → {Client}

Register a listener to watch out for events. Can also be called with client.registerListerner(event,listener)

Parameters:
Name Type Description
event Event

The event whose listener to register

handler NotificationHandler

A function that reacts to events

Source:
Returns:

this instance

Type
Client

registerNotificationHandler(event, handler) → {Client}

Register a listener to watch out for events. Can also be called with client.on(event,listener)

Parameters:
Name Type Description
event Event

The event whose listener to register

handler NotificationHandler

A function that reacts to events

Source:
Returns:

this instance

Type
Client