File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,22 @@ func (*Conn) hashCandidate(iceCandidate webrtc.ICECandidateInit) string {
288
288
return fmt .Sprintf ("%x" , hash [:8 ])
289
289
}
290
290
291
+ // Negotiate exchanges ICECandidate pairs over the exposed channels.
292
+ // The diagram below shows the expected handshake. pion/webrtc v3
293
+ // uses trickle ICE by default. See: https://webrtchacks.com/trickle-ice/
294
+ // ┌────────┐ ┌────────┐
295
+ // │offerrer│ │answerer│
296
+ // │(client)│ │(server)│
297
+ // └─┬────┬─┘ └─┬──────┘
298
+ // │ │ offer │
299
+ // ┌──────────▼┐ ├──────────────►├──►┌───────────┐
300
+ // │STUN Server│ │ │ │STUN Server│
301
+ // │(optional) ├──►│ candidate │◄──┤(optional) │
302
+ // └───────────┘ │ (async) │ └───────────┘
303
+ // │◄─────────────►│
304
+ // │ │
305
+ // │ answer │
306
+ // └◄──────────────┘
291
307
func (c * Conn ) negotiate () {
292
308
c .opts .Logger .Debug (context .Background (), "negotiating" )
293
309
You can’t perform that action at this time.
0 commit comments