Test file download lib please

Blitz3D Forums/Blitz3D Programming/Test file download lib please

Test this little sample:
http://www.smallfreegames.com/test/Download.zip
It is trying to download 3 small files from internet.
I'm especially intrested in tests on computers that connected to internet not directly. Througts proxy servers or something like this.

Works fine.
Net connection by the router with a firewall.

Thanks Mikele.

2 All
Nobody else intrested in file downloading lib for Blitz3D, that allow download files in background througt http request automaticaly finding proxy settings etc?

Here is source of sample:
Type FileDownloadT
        Field FileHandle%
        Field Completed%

        Field RemoteFileName$
        Field LocalFileName$
        Field BytesDownloaded%
        Field SizeOfFile%
End Type

DownloadFile("http://smallfreegames.com/test/Hero1.jpg",  "Hero1.jpg")
DownloadFile("http://smallfreegames.com/test/Hero2.jpg",  "Hero2.jpg")
DownloadFile("http://smallfreegames.com/test/screen.xml", "test.xml")

While Not (AllDownloadsCompleted() Or KeyDown(1))
        Cls
        i=0
        For this.FileDownloadT=Each FileDownloadT
                i=i+1
                ;If DStat%(this\FileHandle, 4)=1 Then DebugLog DStat%(this\FileHandle, 3)
                Select DStat%(this\FileHandle, 4)
                        Case 0
                                Text 10,10+i*20,"File "+Str(i)+" downloading..."
                        Case 1
                                Text 10,10+i*20,"File "+Str(i)+" downloaded."
                        Case 2
                                Text 10,10+i*20,"File "+Str(i)+" failed."
                End Select
        Next
        Flip
        Delay 1
Wend

Cls
Print "All files downloaded."
WaitKey()
End


Function AllDownloadsCompleted()
        For this.FileDownloadT=Each FileDownloadT
                If this\Completed=False
                        If DStat%(this\FileHandle, 4)=False Then Return False
                EndIf
        Next
        Return True
End Function


Function DownloadFile(URL$, LocalFileName$)

        this.FileDownloadT=New FileDownloadT
        this\RemoteFileName$=URL$
        this\LocalFileName$=LocalFileName$

        this\FileHandle=URL2File(this\RemoteFileName$,this\LocalFileName$,True)
        this\SizeOfFile%=DStat(this\FileHandle,3)
        DebugLog this\SizeOfFile%
        this\Completed=False

        Return Handle(this)

End Function


Yep, works for me also.. networked pc connected to internet via a server, firewalled, encased in conrete and buried at sea.