Re: DataChannel: how to know the max size of the sending buffer?

On 05/10/14 15:26, Iñaki Baz Castillo wrote:
> 2014-05-10 14:09 GMT+02:00 Wolfgang Beck <wolfgang.beck01@googlemail.com>:
>> recv() would fail with an exception, when there is no data available,
>> send() would fail with an exception, when the JS tried to send without
>> waiting for a onsendspace() event.
> 
> The problem is that the DataChannel JS API mimics the WebSocket JS API
> (it is intentional), which behaves in the same way.
> 
Ah, ok. Still a horribly clueless design. It may work for WebSockets
which was intended for signaling events, not bulk data transfer.

JS definitely needs a unified, composable way to deal with operations
that may queue and block; WebSockets, Datachannels, File reader/write, etc.


Wolfgang

Received on Sunday, 11 May 2014 18:10:16 UTC