THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Alice is going to call (video/audio) to Bob.
- Alice create RTCPeerConnection object.
- Then she calls RTCPeerConnection::CreateOffer(). Create offer method discovers Alice's public API via STUN server, gather her video/audio settings, pack this information and form a SDP packet.
- Further Alice must transmit the sdp offer to Bob but she doesn't know Bob's IP address therefore she add pair "name=Bob" in the packet and send it ot the Signal server.
- Signal server unpack the packet and retransmit offer to Bob.
- Bob receives this packet and calls RTCPeerConnection::SetRemoteDescription(offer) on his RTCPeerConnection objects.
- Then he creates an answer via RTCPeerConnection::CreateAnswer, append the pair "name=Alice" and sends it to the signal server.
- Server handles answer from Bob and retransmit answer to Alice.
- Alice receives answer from Bob and calls RTCPeerConnection::SetRemoteDesription(answer)
- Also both Alice and Bob calls RTCPeerConnection::SetLocalDescription() with theirs offers (or in Bob's case answer).
- Now they can calls RTCPeerConnection::onTrack(stream) and this stream will sends directly to another peer.
This is a short description how to connect two peers.
Our signal server.
Our signal server uses JSON format for message and work via websocket's protocol.
Why have I used JSON and websockets? Because JSON is a main format for JS in browses and websocket is the fastest protocol for reliable connections.