Re: DataChannels API

On 2012-09-07 11:54, Randell Jesup wrote:
> On 9/7/2012 4:46 AM, Stefan Hakansson LK wrote:
>> On 09/06/2012 04:38 PM, Randell Jesup wrote:
>>> On 9/6/2012 10:19 AM, Adam Bergkvist wrote:
>>>> What triggers the onconnected callback?
>>>
>>> SCTP/DTLS Association connection.
>>
>> Is there really a need to expose this to the application? To me it seems
>> enough with "onopen", "onerror" and "onclose" firing at the DataChannel
>> object.
>
> There is a need to if it might not come up or be delayed in coming up,
> or if the application needs to wait for it to do createDataChannel
> (option 1).  In option 2 it is optional, though it mirrors the
> onclosedconnection.  With option 2 I agree they're of minimal importance
> and could be removed (if we don't think the app wants to know if/when it
> comes up; see above).
>

I'm leaning towards option 2 (doesn't matter a or b) right now. As 
Stefan says, the DataChannels objects are rather self-contained as they 
are specified right now. I mean, their states reflect the state of the 
underlying transport unless explicitly closed. So my take on this right 
now is that I think we shouldn't add onConnection and onClosedConnection 
if we go with option 2 unless we have specific use cases for them.

/Adam

Received on Wednesday, 12 September 2012 14:01:04 UTC