Skip to main content

Module tcp

Module tcp 

Source
Expand description

Direct bare-NDJSON-over-TCP transport (config Transport::Tcp, bd-bfb732).

For receivers that host an inbound TCP listener (e.g. a Wear OS TCP-push foreground service — real Android can host an inbound server). Unlike the relay (which speaks the register/cast frame protocol), this sends bare InjectionCommand NDJSON lines, one per line — exactly what such a receiver drains and applies.

Structs§

TcpSender
A hold-open bare-NDJSON-over-TCP sender for STREAMING dispatch (bd-772cb2): one connection is kept open across many commands instead of reconnecting per command. Connects lazily on the first cast and reconnects on the next cast after a write error (so a transient device drop does not abort the stream).

Functions§

cast_bare
Connect to host:port and send each command as a bare NDJSON line.
render_bare
Render the bare NDJSON lines that would be sent to host:port (for dry-run).