bodhi-realtime-agent / IClientChannel
Interface: IClientChannel
Defined in: src/types/session-client.ts:33
Internal channel used by VoiceSession (send + buffering). Implemented by ClientSenderAdapter.
Properties
supportsPlaybackStateProtocol?
optionalsupportsPlaybackStateProtocol?:boolean
Defined in: src/types/session-client.ts:50
Whether this channel supports the playback-state protocol.
Methods
closeClient()?
optionalcloseClient(code?,reason?):boolean
Defined in: src/types/session-client.ts:59
Close the attached client socket and nothing else; the channel keeps accepting connections. Returns false when no socket was attached. Optional: only a channel that owns the client socket (the local ClientTransport) can close it.
Parameters
code?
number
reason?
string
Returns
boolean
discardBuffered()?
optionaldiscardBuffered():void
Defined in: src/types/session-client.ts:45
Leave buffering mode and DROP the pending frames: nothing is returned and nothing is forwarded, unlike stopBuffering(), which hands them on (the owned socket returns buffered microphone frames for the reconnect drain; hosted channels flush buffered assistant audio to the client). Optional; a caller falls back to stopBuffering() when it is absent.
Returns
void
getSocketHealth()?
optionalgetSocketHealth():ClientSocketHealth|null
Defined in: src/types/session-client.ts:54
State of the attached client socket, or null when none is attached. Optional: only a channel that owns the client socket (the local ClientTransport) can report it.
Returns
ClientSocketHealth | null
sendAudioToClient()
sendAudioToClient(
data):void
Defined in: src/types/session-client.ts:36
Parameters
data
Buffer
Returns
void
sendJsonAfterAudio()?
optionalsendJsonAfterAudio(message):void
Defined in: src/types/session-client.ts:48
Send JSON in delivery order after the turn's audio — playback-state protocol. Optional; absent ⇒ the channel does not participate.
Parameters
message
AnyServerToClientMessage
Returns
void
sendJsonToClient()
sendJsonToClient(
message):void
Defined in: src/types/session-client.ts:37
Parameters
message
AnyServerToClientMessage
Returns
void
start()
start():
Promise<void>
Defined in: src/types/session-client.ts:34
Returns
Promise<void>
startBuffering()
startBuffering():
void
Defined in: src/types/session-client.ts:38
Returns
void
stop()
stop():
Promise<void>
Defined in: src/types/session-client.ts:35
Returns
Promise<void>
stopBuffering()
stopBuffering():
Buffer<ArrayBufferLike>[]
Defined in: src/types/session-client.ts:39
Returns
Buffer<ArrayBufferLike>[]