From: | Rick Hodger |
Date: | 25 Jan 2000 at 10:32:55 |
Subject: | Re: ftp, Roger |
I watched as Davide Zipeto hammered "Re: ftp, Roger" out on their keyboard...
> Hello James
> On 22-Gen-00, James L Boyd wrote:
>> On the subject of tcp, has anyone got downloading of HTTP: files
>> (including 1.1) working? Something I can just call with a URL?
> yes that's my code using the latest tcp extension for bb2.
> Just create the executable files and place it in c:.
> This version crash sometimes.. handle with care :-). This is not a
> complete program like wget, I made it just to get in touch with tcp and
> bb2...
> # A question: Why when I use testTCP the cpu use go to 100% and if I
> perform# #the task with wget it go at 25% ? Any solution ?#
The ReadTCP{maxlen} function you are using is a bit old....the actual
library call requires a memory address which it then fills with the data
it's received, the old ReadTCP{} functions then try to turn that memory into
a string by going through it byte-by-byte...and eats up a lot of CPU in the
process. An easier way to is to make a slightly different function that
doesn't try to convert it into a string, and then just dump that area of
memory out to the file with a ReadMem (I think).
Oh, and your carrage returns you are sending the server should be
Chr$(13)+Chr$(10) otherwise you might find it'll refuse to work on some
servers.
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie