[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    DCPO transport protocol, was Re: PATCH: DCOPServer hanging on non
From:       joerg habenicht <j.habenicht () stud ! uni-hannover ! de>
Date:       2001-01-29 9:03:22
[Download RAW message or body]

Ok, I got a second approach:

how about
1st header:
[ version 4 bit | reserved 3 bit | more data 1 bit (false) | data ] 
(1 byte total)
and
[ version 4 bit | reserved 3 bit | more data 1 bit (true) |
 total msg size 64bit | data ] (9 byte total)

following headers:
[ reserved 7 bit | more 1 bit | sequence number 8 bit | data ]

The idea is this:
if we got small messages, there shouldn't be a large overhead for sending
data. so if we got less than 64kb (more flag == false) there is only a
1 byte header. we don't need no sequence number and no data length,
because the length of data is already transmitted with the ICE header.

If we have to transmit more than one frame, there is additionally
the total length of data in the first frame, to set up the receiving 
buffer size. A sequence number isn't needed here, it would be 0 every
first time.



The following frames doesn't need to transmit the whole data again, so
here we just need a "moredata?" flag and a sequence number for
acknowleging data en gros.
the sequence number is cut down to 8bits = 256 frames.
that means after 127 frames there is an ack-frame sent back to the server.
If you don't like the number we could set the size to 16bits.
The sequence number is set to 0 for the beginning of the transmission,
is ever increased and turns over (255->0), 
so one has to be aware of this while coding.
The sequence number is traced on both sides, so we can detect missing
frames and send a retransmission order back by ak-ing all but the missing
frames.


I think this fits, what about you ?



cu,
Joerg

-- 
THE full automatic planets host
:-)                            http://www.planetsserver.com

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GE/CS/IT d- s+:- a- C++ ULS+++>++++ P++ L+++>++++$ 
E W++ N+(+++) !o? !K? w--(---) !O(++) !M !PS !PE !Y? PGP+ 
t-- 5-- X-- tv+ b++ DI+() D-(+) G>+ e++>+++ h+(*) r% y? UF
------END GEEK CODE BLOCK------
"Man sollte das Leben nicht so ernst nehmen, 
 Du überlebt es sowieso nicht."

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic