IWitWebSocketClient Interface
An interface for all web socket client settings, state determinations, event callbacks, connection, disconnection and request interactions.
The settings required to connect, authenticate and drive server/client communication.
Whether the web socket is disconnected, connecting, connected, or disconnecting.
bool IsAuthenticated[Get]
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 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.
int FailedConnectionAttempts[Get]
Total amount of failed connection attempts made
DateTime LastResponseTime[Get]
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.
Callback on connection state change.
An event callback for processing a response for a request originating on a different client with a topic this client has subscribed to.
Callback when a tracked topic generates a request
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
bool UntrackRequest ( string requestId )
Safely removes a request from the current request list by request id
void Unsubscribe ( string topicId,
bool ignoreRefCount )
Method to subscribe to a specific topic id with a parameter to ignore ref count for local unsubscribing following disconnect/error.