Re: Data API: what is agreed, what is open

Stefan Hakansson LK wrote:
> I have a slight preference for bi-directional beacuse
> a) It makes speccing the API a bit simpler since we need to specify only
> one object type ("dataSocket" or something like that) that can send
> ("send") and receive ("onmessage") rather than two different objects
> (one "dataSendPort" and one "dataReceivePort")

One difficulty is that if we want to leave open the possibility of 
per-packet ordered and reliable transmission flags, but start with 
per-channel settings fixed at channel creation time, then the receiver 
has to make a decision about what kind of channel to create before it 
can receive its first packet. That can have some surprising implications.

If you let the application decide, then somehow it has to make that 
decision before it can get access to the data channel object to receive 
data, even though it may not know or care which choice is best. If you 
base it off the flags on the first packet, then if a non-browser sender 
sends an unreliable packet followed by a reliable one, a browser on the 
receiving side will respond with reliable packets if the first one gets 
dropped, and unreliable packets if it doesn't.

Not that I disagree with the rest of your points.

Received on Friday, 10 February 2012 19:15:44 UTC