api/communication/websocket

Members

(inner) bundesautobahn :Promise.<autobahn.Connection>

Source:

Keep hold of the currently open autobahn connection.

Type:
  • Promise.<autobahn.Connection>

Methods

(static) closeWebsocketConnection() → {Promise.<string>}

Source:

Close the current websocket connection.

Returns:
  • A promise which will resolve as soon as the connection was successfully closed.
Type
Promise.<string>

(static) getWebsocketConnection() → {Promise.<autobahn.Connection>}

Source:

Get the current websocket connection, or open a new one.

If there is no current connection, open one and return that in stead.

Returns:
  • The current websocket connection.
Type
Promise.<autobahn.Connection>

(static) makeWebsocketCall(rpc, optionsopt) → {Promise.<*>}

Source:

Make a rpc call to the ITSLanguage websocket server.

This method will try to establish a websocket connection if there isn't one already.

Parameters:
Name Type Attributes Description
rpc string

The RPC to make. This be prepended by nl.itslanguage as the websocket server only handles websocket calls when the RPC starts with that prefix.

options Object <optional>

Destructed object with options to pass to the websocket server.

Properties
Name Type Attributes Description
args Array <optional>

An array with arguments to pass to the RPC.

kwargs Object <optional>

An object (dictionary) with arguments to pass to the RPC.

options Object <optional>

The options to pass to the RPC.

progressCb function <optional>

Optional callback to receive progressed results.

Returns:
  • The response of the websocket call.
Type
Promise.<*>

(static) openWebsocketConnection() → {Promise.<string>}

Source:

Open a new websocket connection.

There there currently is a open connection, close it and open a new connection.

Returns:
  • A resolved promise which resolves when the connection was successfully created and opened.
Type
Promise.<string>

(inner) establishNewBundesbahn() → {Promise.<autobahn.Connection>}

Source:

Set bundesautobahn to a new Promise which resolves into a autobahn.Connection object when a connection was successfully established.

Returns:
  • A promise which resolves when the connection was successfully created and opened.
Type
Promise.<autobahn.Connection>

(inner) handleWebsocketAuthorisationChallenge(session, method)

Source:

Allow the autobahn.Connection to challenge the provided authentication.

Parameters:
Name Type Description
session autobahn.Session

The session of the current autobahn.Connection.

method string

The authentication method it tries to use.

Throws:
  • When the given method is unknown to the SDK.
Type
Error