A11 TypeScript API - v0.7.0
    Preparing search index...

    Class WebSocketWireStream

    Client-side A11 WireStream over an isomorphic WebSocket.

    The adapter works with the browser WebSocket API and the Node ws package, then delegates packet framing, bounded reassembly, half-close, and abort to ChannelWireStream. Create the endpoint, call start once, and await wait for full bidirectional completion. start() only waits for transport startup; it is not the stream's completion future.

    const stream = valueOrThrow(WebSocketWireStream.createClient(
    'wss://agent.example/actions',
    ));
    valueOrThrow(await stream.start(onMessage));

    Implements

    Index