I have been trying to understand how WebRTC's data channel works and I found this sample to be very helpful.
The example generates a random string of 16KB and transmits it.
However, the data channel's buffered amount is constantly checked. If
more than 8KB is buffered, we wait till the buffered amount goes lower
than 8KB(refer).
Is there any specific reason for this behavior? I have read elsewhere
that the data channel can buffer up to 16MB of data. If that is the
case, why is the buffered amount not allowed to exceed beyond 8KB?
On Apr 26, 2017, at 23:59, Nithyesh Sankar <klas...@gmail.com> wrote:The example generates a random string of 16KB and transmits it. However, the data channel's buffered amount is constantly checked. If more than 8KB is buffered, we wait till the buffered amount goes lower than 8KB(refer).
Is there any specific reason for this behavior? I have read elsewhere that the data channel can buffer up to 16MB of data. If that is the case, why is the buffered amount not allowed to exceed beyond 8KB?
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/4EC78AEC-1ECA-4D1F-9BB9-0B10F65C6E43%40mozilla.com.
> On 29. Apr 2017, at 16:57, Iñaki Baz Castillo <i...@aliax.net> wrote:
>
> 2017-04-28 1:01 GMT+02:00 'Taylor Brandstetter' via discuss-webrtc
>> I have a question of my own: does the standard guarantee anything about a
>> data channel's max buffer size? I couldn't find anything. If there's no
>> guarantee, how is an application expected to avoid filling the buffer and
>> causing the channel to be closed?
>
> Exactly. good question.
Why is the channel being closed if you filled up the send buffer?
Can't you indicated that the send call failed due to a full buffer, but
keep the channel up? This is how you would do this on a non-blocking socket...
Best regards
Michael
>
>
>
>
> --
> Iñaki Baz Castillo
> <i...@aliax.net>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CALiegfn9OTLXJDzcZ8bzC5sG6ak%3DZT82cp2PpK1YqKMNKjx7mw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/30E3EAB4-0040-478A-95F1-1B78F3933EEE%40googlemail.com.