Logo
Client Specification
Overview

Client Specification

Required client behavior for implementing an ION-compatible endpoint.

1 min read
Client Spec

Role Model

A client may be:

  • Audio consumer (receives PCM)
  • Audio producer (sends PCM)

Core protocol behavior remains the same.

Required Sequence

  1. Connect to a reliable ordered full-duplex stream.
  2. Send describe immediately.
  3. Wait for ready and honor returned audio parameters.
  4. Send start to begin streaming.
  5. Exchange audio frames.
  6. Send stop to terminate the stream.

Error and Compatibility Rules

  • Either side may send error
  • Unknown events and frame types should be ignored

Minimal Pseudocode

conn = connect()
send({"type":"describe"})
ready = read()
assert ready.type == "ready"
send({"type":"start"})
while streaming:
read_or_write_audio()
send({"type":"stop"})