Skip to content

Interface: RealtimeSocketHandlers

Defined in: packages/aiui-claude-channel/src/session-core.ts:56

Handlers the session hands the factory to observe the upstream socket.

Methods

onClose()

onClose(code?, reason?): void

Defined in: packages/aiui-claude-channel/src/session-core.ts:70

The socket closed. Vendors report why in the close frame — Gemini puts the real error text ("API key not valid …") in reason — so the factory forwards both when it has them; handlers that ignore them are unchanged.

Parameters

code?

number

reason?

string

Returns

void


onError()

onError(message, data?): void

Defined in: packages/aiui-claude-channel/src/session-core.ts:64

A transport fault. data optionally carries the structured upstream payload (e.g. a rejected handshake's HTTP status + response body) so the session can surface what the API actually said, not just a summary line.

Parameters

message

string

data?

unknown

Returns

void


onMessage()

onMessage(text): void

Defined in: packages/aiui-claude-channel/src/session-core.ts:58

Parameters

text

string

Returns

void


onOpen()

onOpen(): void

Defined in: packages/aiui-claude-channel/src/session-core.ts:57

Returns

void