juice_set_local_description
usage order clarification
#281
-
Per discussion here paullouisageneau/libdatachannel#536 (comment), it sounds like the order of usage for I currently run into this warning, yet still get successful connections established. I would like clarity if this order is required to be correct even upon successful connections. Many thanks for any advice. Cheers. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The warning means both peers think they are the initiator of the connection. It can be recovered at the price of an added round-trip, but it indicates a more fundamental issue in the way signaling is done. ICE is designed around an initiating agent and responding agent. libjuice handles it automatically: the initiator calls This ensures proper parameter negotiation and role selection. The collision if both agents initiate the connection at the same time is handled as an ICE conflict. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the detailed answer. |
Beta Was this translation helpful? Give feedback.
The warning means both peers think they are the initiator of the connection. It can be recovered at the price of an added round-trip, but it indicates a more fundamental issue in the way signaling is done.
ICE is designed around an initiating agent and responding agent. libjuice handles it automatically: the initiator calls
juice_get_local_description()
to send its description to the responder, the responder first sets the initiator's description withjuice_set_remote_description()
, then callsjuice_get_local_description()
to send its description back to the initiator which sets it withjuice_set_remote_description()
.This ensures proper parameter negotiation and role selection. The colli…