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

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:19:27 +0200
Message-ID: <CALiegfmUh3Jgo5t7DF6tzoxE9vibyM2iJLk25TcCKS8x0UnB-A@mail.gmail.com>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
Hi, according to the spec (and this is the same for WebSocket):

"if the data cannot be sent, e.g. because it would need to be buffered
but the buffer is full, the user agent must abruptly close channel’s
underlying data transport with an error."

OK, I can check the current buffered data size via
socket.bufferedAmount. But, how may I know the buffer value that would
cause send() to fail *without* calling send()?

If the buffer size is not standardized, shouldn't the API provide a getter?

Thanks a lot.

-- 
Iñaki Baz Castillo
<ibc@aliax.net>
Received on Wednesday, 7 May 2014 15:20:16 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:40 UTC