Re: Is DataChannel label unique?

On 2013-06-25 23:04, piranna@gmail.com wrote:
>  > As far as I understand the spec and Mozilla's implementation the label
>  > has no semantics for the browser. You can set it to any value you like
>  > and it's your responsibility as developer to make the DCs
>  > distinguishable from each other.
>  >
> So, they are there just for application dependent purposses, isn't it?

The original idea was to be able to pair up DataChannel objects created 
with createDataChannel() on one side, with the corresponding channels on 
the other side (dispatched with the datachannel event). Since there was 
no guarantee that the dispatching on the b-side were to happen in the 
same order as the createDataChannel() calls on the a-side, the label was 
required.

/Adam

Received on Wednesday, 26 June 2013 10:54:42 UTC