VoiceAgentWebSocketHandlers interface
Callbacks invoked by a VoiceAgentWebSocketTransport as connection events occur.
Properties
| on |
Invoked when the connection closes. |
| on |
Invoked when the transport encounters an error. |
| on |
Invoked when a message is received from the service. |
Property Details
onClose
Invoked when the connection closes.
onClose: (code: number, reason: string, wasClean: boolean) => void
Property Value
(code: number, reason: string, wasClean: boolean) => void
onError
Invoked when the transport encounters an error.
onError: (error: Error) => void
Property Value
(error: Error) => void
onMessage
Invoked when a message is received from the service.
onMessage: (data: string | ArrayBuffer) => void
Property Value
(data: string | ArrayBuffer) => void