Ok, let's do this again, this time on pop3 example. I'm gonna do this in pseudo
code.
two progress bars p1 for current message, p2 for all messages
pop3.stat
p1.value = 0
p2.value = 0;
p1.total = 0
p2.total = pop3.stat.totalsize
for each message do begin
p1.total = pop3.curr.message.size
p1.value = 0
pop3.fetch.message
end;
procedure onStatus(stat_type, value) begin
if stat_type = hr_read_count then begin
p1.value += value
p2.value += value
end
end
Now on busy network, p2 will reach 100% before all messages are downloaded
which at least annoying if not acceptable.
Regards,
Miha
"Lukas Gebauer" <[EMAIL PROTECTED]> wrote on 19.1.2007 13:06:30:
>> You are advertising to use OnStatus event to monitor download/upload
>> progress. This event has a big issue with slow and busy networks where
>> packets must be resend. I believe that what it's reported is total
>> data sent together with any overhead TCP protocol might generate.
>>
>> Because that's the only way my total progress bar on busy networks
>> reaches 100% way ahead before all messages are downloaded.
>>
>> So how to get the data transfered - protocol overhead - re-send size.
>
>OnStatus reporting how many bytes are sended by Send operation. If
>underlaying network protocol re-send some packet, i not know it no
>winsock level.
>
>There is different problem. Send operation copy data into internal
>winsock buffers, so, ended Send operation not meaning "all datas was
>sended to wire"!
>
>In your case, you have all data sended by application (I am reporting
>it to you and you display 100%), but network stack on your computer
>have it in their internal buffers, because all data was not sended
>yet. But this is out of my control.
>
>You can set smaller chunk for sending in synapse, then progressbars
>working better, however it decrease performance.
>
>
>--
>Lukas Gebauer.
>
>E-mail: [EMAIL PROTECTED]
>http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
>
>
--
It's time to get rid of your current e-mail client ...
... and start using si.Mail.
It's small & free. ( http://simail.sourceforge.net/ )
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public