VoiceAgentWebSocketHandlers interface

Callbacks invoked by a VoiceAgentWebSocketTransport as connection events occur.

Properties

onClose

Invoked when the connection closes.

onError

Invoked when the transport encounters an error.

onMessage

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