The WebRTC signal envelope: what RtcPeer sends its far end, carried by
RtcMesh as a room payload (room_send's payload, a string the server
relays without reading).
A signal is one of two things, the two that perfect negotiation exchanges:
a session description (an offer or an answer) or a trickled ICE candidate.
On the wire it is the JSON text of one object whose rtc key is the
envelope's version, RTC_SIGNAL_VERSION, beside exactly one of
description or candidate:
{"rtc":1,"description":{"type":"offer","sdp":"v=0\r\n…"}}
{"rtc":1,"candidate":{"candidate":"candidate:…","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":"…"}}candidate is RTCIceCandidate.toJSON(). The end of candidates is never
sent: trickle works without it. The rtc key also tells a signal apart from
the room's other payloads (a room's text, say): decode_rtc_signal answers
not_rtc_signal for any payload without it, so a room's other listeners can
read their own. A newer envelope bumps the version, and an older client
refuses it as unsupported_version rather than misreading it.