API reference

IWitWebSocketClient Interface

Properties

The settings required to connect, authenticate and drive server/client communication.
Whether the web socket is disconnected, connecting, connected, or disconnecting.
Whether authentication had completed successfully or not
Whether there currently is data being encoded and/or queued to be sent from the web socket.
Whether there currently is data being received and/or decoded from the web socket.
Whether there currently are any scripts that have called Connect() and not yet requested a Disconnect().
Whether will be reconnecting
Total amount of scripts that have called Connect() and have not yet called Disconnect(). Used to ensure WebSocketClient is only disconnected once no scripts are still referenced.
Total amount of failed connection attempts made
The utc time of the last response from the server
The requests currently being tracked by this client. Each access generates a new dictionary and should be cached.

Events

Callback on connection state change.
Callback when a tracked topic generates a request

Member Functions

Attempts to connect to the specified
Disconnects socket after checking state
Send a request via this client if possible
Safely adds a request to the current request list
Safely removes a request from the current request list
Safely removes a request from the current request list by request id
Method to subscribe to a specific topic id with a parameter to ignore ref count for local unsubscribing following disconnect/error.