W3C home > Mailing lists > Public > public-webrtc@w3.org > May 2014

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

From: Iñaki Baz Castillo <ibc@aliax.net>
Date: Wed, 7 May 2014 17:42:19 +0200
Message-ID: <CALiegfmWTYcDTJqb8tWn2XB6L=AnhK7Cvx8Lv3ZbvViM3_zPaA@mail.gmail.com>
To: "piranna@gmail.com" <piranna@gmail.com>
Cc: "public-webrtc@w3.org" <public-webrtc@w3.org>
2014-05-07 17:28 GMT+02:00 piranna@gmail.com <piranna@gmail.com>:
> I would find it better that process gets blocked until the buffer gets
> some space available (it's said, it has send something),

No way. JavaScript event loop MUST NEVER block. If it blocked all the
web would block (even a mouse click, timers, etc). Just the alert()
call blocks the JavaScript event loop (and you know how "usable" a web
is while displaying an alert) ;)

> or raise an error or throw an exception

That's the same :)
And yes, the implementation (at least in Chrome) does raise an error
(BTW an undocumented kind of error, of course, as most of the WebRTC

> but NO close the channel... Too much agressive to my taste, specially without being able to know how to
> preven it...

I agree. Anyhow: I've tested that Chrome does NOT close the socket
after raising the error. This is, you can send data after some time on
the same socket.

Iñaki Baz Castillo
Received on Wednesday, 7 May 2014 15:43:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:17:58 UTC