W3C home > Mailing lists > Public > public-webrtc@w3.org > April 2014

Re: renaming updateIce

From: cowwoc <cowwoc@bbs.darktech.org>
Date: Wed, 30 Apr 2014 04:37:38 -0400
Message-ID: <5360B652.5020705@bbs.darktech.org>
To: public-webrtc@w3.org
On 30/04/2014 4:22 AM, Adam Bergkvist wrote:
> On 2014-04-30 07:26, Justin Uberti wrote:
>> Since RTCConfiguration is no longer solely about ICE, and we now have
>> PeerConnection.getConfiguration(), I propose that
>> PeerConnection.updateIce() be renamed to
>> PeerConnection.updateConfiguration(), or perhaps even
>> PeerConnection.setConfiguration().
>>
>> Any objections to this change?
>
> I support this.
>
> /Adam
>

I think setConfiguration(RTCConfiguration) is preferable in the sense 
that you don't want to end up with PeerConnection.getConfiguration() 
returning a value that doesn't actually correspond to the current 
PeerConnection state.

If you use the Builder design pattern, you could do even better:

   PeerConnection.getConfiguration().changeSomething().apply()

where PeerConnection.getConfiguration() returns a copy-on-write 
configuration object and apply() updates the PeerConnection, otherwise 
the object is discarded and never used.

Gili
Received on Wednesday, 30 April 2014 08:38:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:38 UTC