Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] open/direct and stream underrun?

From: petr::krenzelok::trz::cz at: 5-Jun-2001 23:44

Hi, with great help of Scott I just made my POST http method for downloading large files working satisfactory. Once looking how nicely our 22 MB file downloads and is stored on shared Novell Netware drive, open/direcct draw my attention. I have basically 2 questions: Let's assume following code: while [data: copy/part http-port buffer-size][append file-port data] 1) We are faster than server. What happens? Am I correct if I assume, that in such case, we end up with not fully downloaded file? We don't wait for anything, right? So if there are no data coming from http-port, we quit ... Is it better to use cached port then? 2) Reverse scenario - our server sends us data "too fast", so in comparison our script is "too slow" and before we read out data out of the port, server sends us new data. But we are using /direct refinement, so what happens with older data? Does OS take care of tcp data caching to some degree? Does it have anything in common with TCP stack "window" size? Probably questions for Holger, but noone is prevented from answering them too :-) Thanks, -pekr-