Re: Issue 115: Restart method needed for the ICE Listener?

Hi Bernard,

I see. Notice, however, that you originally asked if "a restart method 
was needed for the ICE listener" but in the example below you talk about 
RTCIceTransport.restart(). Notice that you are no longer talking about 
adding restart() to the event listener but rather to the transport 
object (which I think is a good thing).

Gili

On 27/06/2014 1:59 PM, Bernard Aboba wrote:
> Gilli asked:
>
> "why  would you add the method on the listener, as opposed to whatever
> triggered the beginning of the gathering process in the first place (I
> assume you can gather candidates without a listener)?"
>
> [BA] In the forking case,  multiple RTCIceTransport objects might need to be created, one for each response.
>
> In the Editor's draft this is illustrated in the example in Section 5.4 (see below).
>
> In such a case, all the RTCIceTransport objects would share credentials, so calling RTCIceTransport.restart() on any of them would have side effects on the others.
>
> ===============================================
>
> // Example to demonstrate forking when RTP and RTCP are not multiplexed.
>
> var iceOptions = ...;
> var iceRtpListener = new RTCIceListener(iceOptions);
> var iceBaseRtpTransport = new RTCIceTransport(iceRtpListener);
> //create the RTCP ICE transport
> var iceBaseRtcpTransport = iceBaseRtpTransport.createAssociatedTransport();
>
> mySendInitiate(
> {
>     "icertp": iceBaseRtpTransport.getLocalParameters(),
>     "icertcp": iceBaseRtcpTransport.getLocalParameters()
>   },
>    function(response) {
>    // We may get N responses
>    var iceRtpTransport = new RTCIceTransport(iceRtpListener);
>    // Create new ice RTCP transport based on the (implicitly created) iceListener
>    var iceRtcpTransport = iceRtpTransport.createAssociatedTransport();
>
> // check to make sure the RTCRtpIceListener objects are set up as expected.
>    assert(iceRtpTransport.iceListener == iceBaseRtpTransport.iceListener);
>    assert(iceRtcpTransport.iceListener == iceBaseRtcpTransport.iceListener);
>
>    iceRtpTransport.start(response.icertp, RTCIceRole.controlling);
>    iceRtcpTransport.start(response.icertcp, RTCIceRole.controlling);
>    // ... setup DTLS, RTP, SCTP, etc.
> });
>
> iceBaseRtpTransport.onlocalcandidate = mySendLocalRtpCandidate;
> iceBaseRtcpTransport.onlocalcandidate = mySendLocalRtcpCandidate;
>      

Received on Friday, 27 June 2014 19:01:42 UTC