webrtc ice 協商一些記錄

參考規範:https://tools.ietf.org/html/rfc5245

 

Lite Implementations: 通常是ice服務器能夠實現,這種模式下,只接受binding request請求,而且回覆。 不會主動發送binding request請求給對方

To make it easier for these devices to
   support ICE, ICE defines a special type of implementation called LITE
   (in contrast to the normal FULL implementation).  A lite
   implementation doesn't gather candidates; it includes only host
   candidates for any media stream.  Lite agents do not generate
   connectivity checks or run the state machines, though they need to be
   able to respond to connectivity checks.  When a lite implementation
   connects with a full implementation, the full agent takes the role of
   the controlling agent, and the lite agent takes on the controlled
   role.  When two lite implementations connect, no checks are sent.

Full Implementations: ice客戶端實現,這種模式既能夠收binding request,也能夠發binding request.

 

controlled 和 controlling角色肯定: 

https://tools.ietf.org/html/rfc5245#section-5.2  Determining Role 有詳細描述html

這裏只記錄其中一種狀況:服務器

One agent full, one lite:  The full agent MUST take the controlling
      role, and the lite agent MUST take the controlled role.  The full
      agent will form check lists, run the ICE state machines, and
      generate connectivity checks.  That agent will execute the logic
      in Section 8.1 to nominate pairs that will be selected by ICE, and
      use the logic in Section 8.1.2 to end ICE.  The lite
      implementation will just listen for connectivity checks, receive
      them and respond to them, and then conclude ICE as described in
      Section 8.2.  For the lite implementation, the state of ICE
      processing for each media stream is considered to be Running, and
      the state of ICE overall is Running.

也就是 full agent必須是 controlling role, lite agent 是controlled ide

相關文章
相關標籤/搜索