On Fri, Mar 20, 2009 at 1:22 AM, Fabio Forno <fabio.fo...@gmail.com> wrote:

>> Of course, I still question the need for 'u' at all if we're doing it like
>> this.
>
> Now I remember: for limiting latency it's better to allow a window of
> unacked stanzas  (on slow mobile connections each roundtrip can be 2-3
> seconds)

Sleep is always beneficial. No need of a sequence number also for
multiple unacked stanzas. Example:

---- start session, both client and server reset their counter ---

C,u=1: <message/>
C,u=2: <message/>
C,u=3: <message/>
S: <a h="3"/> <--- messages arrived too fast, the server has sent a
single ack for all
C,u=4: <message/>

==== first case ====
----  broken link, the server has received u=4 and processed it, but
it didn't succeed in sending back the ack  ----

---- resume session: client sends u=4, server  h=4, no need to resend u=4  ----

---- new conversation follows ----

==== second case ====
----  broken link, the server hasn't received u=4 and processed it  ----

---- resume session: client sends u=4, server  h=3, client resends u=4   ----
C,u=4: <message/>

---- new conversation follows ----

-- 
Fabio Forno, Ph.D.
Bluendo srl http://www.bluendo.com
jabber id: f...@jabber.bluendo.com

Reply via email to