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

WitWebSocketAdapter Class

Extends MonoBehaviour, IPubSubAdapter
A publish/subscribe MonoBehaviour adapter for WitWebSocketClients

Fields

The script used to provide the WitWebSocketClient

Properties

The current web socket client
The topic to be used for publishing/subscribing to the current client provider
The current subscription state of the adapter
Callback when successfully subscribed to the current topic
Callback when successfully unsubscribed from the current topic

Events

Event callback for subscription state change
Callback when a request is generated for the subscribed topic

Protected Functions

virtual void OnEnable ( )
virtual void HandleRequestGenerated
( string topicId,
virtual void OnDisable ( )
virtual void OnDestroy ( )
Handle currently set topic id subscription changes only
Set 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 topic, unsubscribe to the previous & subscribe to a new
Did you find this page helpful?
Thumbs up icon
Thumbs down icon