Re: Sending very large chunks over the data channel

> 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.

+1, anyway the data is already on memory, it also doesn't need to be
copied, just queue the object on a list of objects (data) to be
send... Problem here would be if the connection gets clossed when
there are still some objects on that list, you wouldn't be sure if an
object has been send or not (send() returning a promise?):

-- 
"Si quieres viajar alrededor del mundo y ser invitado a hablar en un
monton de sitios diferentes, simplemente escribe un sistema operativo
Unix."
– Linus Tordvals, creador del sistema operativo Linux

Received on Wednesday, 28 May 2014 12:10:23 UTC