Local IPC and lifecycle
Native worker creates a nonblocking TCP listener on 127.0.0.1 with an ephemeral port. It starts one hidden companion with that port and a random per-launch GUID. The companion sends a version-1 hello containing the GUID before Unreal sends connection settings. Tokens/passwords do not appear in command-line arguments. This isolates the local endpoint from the network, not from privileged processes on the same host.
All integers are little-endian. Frames start with an int32 length including the kind byte, then a byte kind and payload. Maximum length is 3840×2160×4+1024. Partial reads/writes are retained; invalid lengths abort the connection before payload allocation.
| Kind | Payload |
|---|---|
| 1 | UTF-8 JSON: hello, initial Settings, status, heartbeat, sources, or in-memory credential replacement; a client control packet after settings requests stop |
| 2 | int32 width, int32 height, int64 microsecond timestamp, tightly packed BGRA |
| 3 | signed PCM16 little-endian, 48 kHz, stereo interleaved |
| 4 | JSON {topic,payload,reliable,identity}; payload is base64; identity is supplied on receipt |
Video queues keep only the latest frame; audio queues are bounded to eight packets per direction; data queues are bounded. Blueprint SendData returns local queue acceptance, not remote acknowledgement. The worker only accepts media/control submissions after the publisher connects. Queue contents are discarded when a connection generation ends. Reliable RTC requests are not durable messages.
The companion is responsible for HTTP auth, cloud code redemption, fresh session/preview joins, RTC URL selection, media and data conversion, and per-room retry. The native worker owns process supervision and emits game-thread events. Objects and textures are only changed on Unreal’s game/render threads. Camera readback has one transfer in flight. Texture updates copy decoded BGRA into an RHI update; this is a CPU path after decoding.
ShowServer currently recognizes stable medianode-* identities. BPUnrealRTC deliberately uses medianode-unreal-{OutputId} with deviceName=BPUnrealRTC for existing stable source/session behavior, without changing server identity parsing. Do not share OutputId between active cameras. Source publication track names are video, mask, audio. Preview permissions are unchanged; no server authorization is widened.