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 23:49:37 +0200
Message-ID: <CALiegfktF-nv0EgHMMe8R6wHo72-raG8oXf2BthyV=9ZNBg4cA@mail.gmail.com>
To: tim panton <thp@westhawk.co.uk>
Cc: "public-webrtc@w3.org" <public-webrtc@w3.org>
2014-05-07 22:37 GMT+02:00 tim panton <thp@westhawk.co.uk>:
> But anything you send after the failure is by definition out of sequence,
> since there is a hole.
>
> There is no way the stack can know that you don’t really care about the
> order when you created an ordered reliable channel.
>
> What’s more there is no way the far end javascript can know that there is a hole, since
> it didn’t get that data.

I understand your point, but still don't agree given that my TCP
example is the same case (write() fails but the socket remains open
and you can try to send the same data later).

What do you mean with "there is a hole"?

try {
  socket.send(veryBigData);
}
catch(e) {
  // OK, send later (or poll the socket.bufferedAmount until it is
zero and send then).
  [...]
}

Where is the hole or the data lost in this code? (NOTE: of course I do
know that the rest of the code must be aware of this, may be via
status flags or whatever).

-- 
Iñaki Baz Castillo
<ibc@aliax.net>
Received on Wednesday, 7 May 2014 21:50:25 UTC

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