Does the client-side `ConnectionCheck` util test t...
# ask-ai
r
Does the client-side
ConnectionCheck
util test the user's ability to receive data from the room? I see utilities for connecting to the room and publishing data to the room, but it's unclear if any data subscription is tested. Would I need to create an agent to send some test data once the user connects?
t
Thanks for reaching out, Riley. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether the client-side
ConnectionCheck
verifies that a client can receive data from the room. Short answer: it does not. •
ConnectionCheck
verifies connectivity and the ability to publish media (audio/video), plus network checks (WebRTC, WebSocket, TURN, reconnection, protocol, region quality). • It does NOT include built-in checks for subscribing to or receiving inbound data tracks or data packets. To validate a client's ability to receive data you will need a sender in the room after the client connects — for example: • a test agent or server that publishes a data packet or data track, or • another participant that sends a known test message. After the sender publishes, your client can confirm reception via the data event handlers (e.g., the client-side data-received callbacks). If you want, I can outline a minimal test flow or example code to implement a test agent and client-side subscription check. Which platform (web, iOS, Android, or server) are you using? Sources: Diagnosing Connection Errors with Connection Test Utility | Data packets | LiveKit docs | Job lifecycle | LiveKit docs
r
Thank you, but I don't need a code sample just yet. I have a few more big picture questions first. We're looking to proactively test the connection before the user launches into the full experience of chatting with our agent. Should we use a separate room for connection testing, and then once that succeeds connect to the "real" room as we do today? Or should we do everything in one room and only dispatch the agent after the connection tests have passed
t
Thanks — responding to whether you should use a separate test room or run tests in the real room before dispatching the agent. Recommendation: use a separate test room for connection checks, then connect to the real room only after tests pass. Why: • Keeps production rooms free of test traffic, logs, and side effects (webhooks, event handlers, agent triggers). • Lets you fail fast on network/TURN/WebRTC issues without impacting agent lifecycle. • Matches LiveKit testing patterns and avoids accidental state changes in the real session. Suggested minimal flow: 1. Connect user to a lightweight test room. 2. Run connection checks (WebSocket, WebRTC, TURN, publish checks as needed). 3. If checks pass, disconnect from test room and connect to the real room, then dispatch the agent. 4. If checks fail, surface guidance to the user (retry, switch network) and do not dispatch the agent. If you want, I can list which exact checks to run for a pre-call gate and how to handle different failure cases. Which platform are you focused on (web, iOS, Android, server)? Sources: Diagnosing Connection Errors with Connection Test Utility | Testing and evaluation | LiveKit docs
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
r
How can I handle the different failure cases for the different checks?