API reference
API reference
Select your platform
No SDKs available
No versions available

WitWebSocketAdapter Class

A publish/subscribe MonoBehaviour adapter for WitWebSocketClients

Properties

IVLogger Logger[Get]
The current web socket client
The various pub sub settings available
The current subscription state of the adapter
Callback when successfully subscribed to the current topic
Callback when successfully unsubscribed from the current topic

Fields

The script used to provide the WitWebSocketClient

Events

Event callback for subscription state change
An event callback for processing a response for a request originating on a different client with a topic this client adapter has subscribed to.
Callback when a request is generated for the subscribed topic

Protected Functions

virtual void OnEnable ( )
virtual bool RaiseProcessForwardedResponse
( string topicId,
string requestId,
string clientUserId,
WitChunk responseChunk )
virtual void HandleRequestGenerated
( string topicId,
virtual void OnDisable ( )
virtual void OnDestroy ( )
Handle currently set topic id subscription changes only
Determines the current subscription state

Member Functions

Safely sets the new web socket client provider if possible
Send a request with a specified topic
Set the pubsub settings, unsubscribe to the previous & subscribe to a new
Did you find this page helpful?
Thumbs up icon
Thumbs down icon