API reference

WitWebSocketAdapter Class

A publish/subscribe MonoBehaviour adapter for WitWebSocketClients
Meta::Voice::Net::WebSockets::WitWebSocketAdapter extends MonoBehaviour.

Overview

Data Fields

The script used to provide the WitWebSocketClient
The current web socket client
string
TopicId[Get]
The topic to be used for publishing/subscribing to the current client provider

Properties

UnityEvent
Callback when successfully subscribed to the current topic
UnityEvent
Callback when successfully unsubscribed from the current topic

Events

Callback when a request is generated for the subscribed topic

Object Data

void
void
void
HandleRequestGenerated
( string topicId,
void
void

Public Member Functions

void
Safely sets the new web socket client provider if possible
void
Send a request with a specified topic
void
SetTopicId
( string newTopicId )
Set the topic, unsubscribe to the previous & subscribe to a new

Details

Fields

IWitWebSocketClientProvider Meta.Voice.Net.WebSockets.WitWebSocketAdapter.WebSocketProvider
The script used to provide the WitWebSocketClient
WitWebSocketClient Meta.Voice.Net.WebSockets.WitWebSocketAdapter.WebSocketClient
The current web socket client
string Meta.Voice.Net.WebSockets.WitWebSocketAdapter.TopicId
The topic to be used for publishing/subscribing to the current client provider

Properties

UnityEvent Meta.Voice.Net.WebSockets.WitWebSocketAdapter.OnSubscribed
Callback when successfully subscribed to the current topic
UnityEvent Meta.Voice.Net.WebSockets.WitWebSocketAdapter.OnUnsubscribed
Callback when successfully unsubscribed from the current topic

Events

Action<IWitWebSocketRequest> Meta.Voice.Net.WebSockets.WitWebSocketAdapter.OnRequestGenerated ( )
Callback when a request is generated for the subscribed topic

Object Data

virtual void Meta.Voice.Net.WebSockets.WitWebSocketAdapter.OnEnable ( )
No description available.
virtual void Meta.Voice.Net.WebSockets.WitWebSocketAdapter.HandleSubscriptionStateChange
( string topicId,
No description available.
virtual void Meta.Voice.Net.WebSockets.WitWebSocketAdapter.HandleRequestGenerated
( string topicId,
No description available.
virtual void Meta.Voice.Net.WebSockets.WitWebSocketAdapter.OnDisable ( )
No description available.
virtual void Meta.Voice.Net.WebSockets.WitWebSocketAdapter.OnDestroy ( )
No description available.

Member Functions

void Meta.Voice.Net.WebSockets.WitWebSocketAdapter.SetClientProvider
( IWitWebSocketClientProvider clientProvider )
Safely sets the new web socket client provider if possible
void Meta.Voice.Net.WebSockets.WitWebSocketAdapter.SendRequest
( IWitWebSocketRequest request )
Send a request with a specified topic
void Meta.Voice.Net.WebSockets.WitWebSocketAdapter.SetTopicId
( string newTopicId )
Set the topic, unsubscribe to the previous & subscribe to a new