pub enum Signal {
Announce {
peer: PeerId,
world: String,
},
Welcome {
id: PeerId,
},
Peers {
peers: Vec<PeerId>,
},
Offer {
from: PeerId,
to: PeerId,
sdp: String,
},
Answer {
from: PeerId,
to: PeerId,
sdp: String,
},
Candidate {
from: PeerId,
to: PeerId,
candidate: String,
},
Leave {
peer: PeerId,
},
}Expand description
Rendezvous signaling — the messages peers exchange (via a stateless rendezvous)
to introduce themselves and negotiate a direct connection. The rendezvous relays
these blindly; it never handles a MeshPose.
Variants§
Announce
“I’m here” — a peer joining a world announces itself. peer is the
client’s provisional self-picked id; a rendezvous that assigns ids
replies with Signal::Welcome to override it.
Welcome
Rendezvous → newcomer: your server-assigned peer id (collision-free).
Sent before Signal::Peers. A stateless rendezvous MAY omit it, in which
case the client keeps its provisional announce id.
Peers
Rendezvous → newcomer: the peers already present (to offer to).
Offer
WebRTC session description (connection offer).
Answer
WebRTC session description (connection answer).
Candidate
An ICE candidate (a possible network path to a peer).
Leave
A peer left the world.