W3C home > Mailing lists > Public > public-webrtc@w3.org > January 2012

[Bug 15206] Add API for sending and receiving p2p application data

From: <bugzilla@jessica.w3.org>
Date: Fri, 06 Jan 2012 06:41:22 +0000
To: public-webrtc@w3.org
Message-Id: <E1Rj3UQ-0004xF-MN@jessica.w3.org>

--- Comment #4 from Stefan Hakansson LK <stefan.lk.hakansson@ericsson.com> 2012-01-06 06:41:21 UTC ---
(In reply to comment #3)
> Created attachment 1061 [details]
> DataStreams proposal downloaded from google docs 2012 Jan 6
> Downloaded Justins doc from google docs just to get a version into the bug

Some more comments (refering to

* As a dataStream can be added to several PeerConnections, bufferedAmount
should be a PeerConnection property, since the throughput can vary. The same
applies to "onreadytosend". An alternative could be to allow a dataStream to be
connected to one PeerConnection only, but that defeats the purpose of the
dataStream - you could just as well have "send()" methods on the PeerConnection

* For the "return -1 if unsuccessful, non-neg integer if successful" part: is
this supported by the protocol (i.e. is there a feedback mechanism in SCTP)? 

* Does it really make sense that dataStream inherits from Stream? The natural
thing would rather be that the "send" method of dataStream could take
DOMString, blob, ArrayBuffer and *Stream* as arguments; Stream to be introduced
once it has been added to the File API spec. This would align it closer to
WebSockets and XHR. For unreliable dataStream's, probably only DOMString's
would make sense (no point in sending a file unreliably). Note also that there
need to be some info on how to handle incoming binary data (as blob or as
ArrayBuffer; WebSocket has the "binaryType" attribute).

* The proposal is inconsistent with regards to how a DataStream is created. The
text says PeerConnection.createDataStream() while the examples and idls uses a
DataStream constructor.

* Why introduce new methods for adding/removing data streams (addDataStream()
and removeDataStream()) when the localStreams/remoteStreams attributes and
onaddstream/onremovestream event listeners are reused?

* Re-use of MessageEvent's as defined in http://dev.w3.org/html5/postmsg/
should be considered for "onmessage" - it is already used for Server-Sent
Events and Web Sockets. Perhaps channel messaging could be used to align more
with the rest of the web platform?

Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.
Received on Friday, 6 January 2012 06:43:31 UTC

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