Programming and Scripting :: wget gui



What can u excaclty do with those sockets?
You can go low level and implement an RFC as the example that I posted.

Or you can use higher level known protocols like FTP

Here is a trivial example: (Warning this script will try to download the mydsl extension Xeyes into the current directory)

Code Sample

#!/bin/murgaLua
local ftp = require("socket.ftp")
file,error = ftp.get("ftp://ibiblio.org/pub/Linux/distributions/damnsmall/mydsl/apps/xeyes.info")
if error == nil then io.output("xeyes.info"); io.write(file); end
file,error = ftp.get("ftp://ibiblio.org/pub/Linux/distributions/damnsmall/mydsl/apps/xeyes.tar.gz.md5.txt")
if error == nil then io.output("xeyes.tar.gz.md5.txt"); io.write(file); end
file,error = ftp.get("ftp://ibiblio.org/pub/Linux/distributions/damnsmall/mydsl/apps/xeyes.tar.gz;type=i")
if error == nil then io.output("xeyes.tar.gz"); io.write(file); end

is it possible to use those sockets and get a progress bar in the gui?
anyways, it looks cool, certainly gonna look at that some more

It would seem to me that in order to have a progress bar would be to fetch the file in chunks then it would be easy to write a co-routine and having such would not be difficult to display a progress bar.

Using the standard protocol ftp does not allow chunks. So, I would think the more difficult part would be to use the lower level socket interface and use the RFC specs for FTP. Much more work but doable. ATM I am very busy with working on new DSL tiny core or I would attempt it. Maybe later if still not done.

Ok, but when using sockets, are we still using wget? Cos this app is actually a wget GUI xD.
Next Page...
original here.