- From: Iñaki Baz Castillo <ibc@aliax.net>
- Date: Wed, 28 May 2014 14:17:26 +0200
- To: Harald Alvestrand <harald@alvestrand.no>
- Cc: "public-webrtc@w3.org" <public-webrtc@w3.org>
2014-05-28 14:04 GMT+02:00 Harald Alvestrand <harald@alvestrand.no>: >> This is JavaScript land. Why does not the browser just allocate space >> for *all* the data provided in send() calls and deals with EAGAIN and >> similar stuff internally? This is, send() NEVER fails, period. The >> browser holds the data and sends it when it can. The JS code still can >> check the bufferedAmount attribute in order to detect memory leaks due >> to slow sending. > > > That's what the API looks like now. Until it fails, it works. Not the same. I meant "send() MUST never fail". > We're discussing what to do when the browser is unable to do that. You mean that the browsers runs out of memory to store the pending data to be sent? > There's only so many gigabytes of storage available on the devices these > days. Sorry, I don't get it. >> BTW: if I send a HTTP POST request with a large body (a ISO image) via >> AJAX, would I get an error if the "sending buffer" is full? AFAIK no, >> right? if so, why don't we provide the same behavior for DataChannel's >> send() method? > > Please show me your Javascript that sends a large video file using HTTP > POST. > > Code speaks louder than words here. I haven't. I was just wondering. Anyhow, do you see that the XMLHttpRequest.send() returns error or fires an exception? me not: https://developer.mozilla.org/es/docs/XMLHttpRequest#send() so? why is so unfeasible to have the same behavior for DataChannel.send()? -- Iñaki Baz Castillo <ibc@aliax.net>
Received on Wednesday, 28 May 2014 12:18:17 UTC