Fixing bugs...

This commit is contained in:
Diego Nehab 2004-06-20 22:19:54 +00:00
parent 5dc5c3ebe8
commit f7579db9e8
24 changed files with 127 additions and 94 deletions

View file

@ -14,7 +14,7 @@
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img border=0 alt="LuaSocket" src="luasocket.png">
<img width=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
@ -227,10 +227,10 @@ message describing the reason for failure.
-- load the ftp support
local ftp = require("ftp")
-- Log as user "diego" on server "ftp.tecgraf.puc-rio.br",
-- using password "nehab", and store a file "README" with contents
-- Log as user "fulano" on server "ftp.example.com",
-- using password "silva", and store a file "README" with contents
-- "wrong password, of course"
f, e = ftp.put("ftp://diego:nehab@ftp.tecgraf.puc-rio.br/README",
f, e = ftp.put("ftp://fulano:silva@ftp.example.com/README",
"wrong password, of course")
</pre>
@ -239,13 +239,13 @@ f, e = ftp.put("ftp://diego:nehab@ftp.tecgraf.puc-rio.br/README",
local ftp = require("ftp")
local ltn12 = require("ltn12")
-- Log as user "diego" on server "ftp.tecgraf.puc-rio.br",
-- using password "nehab", and append to the remote file "LOG", sending the
-- Log as user "fulano" on server "ftp.example.com",
-- using password "silva", and append to the remote file "LOG", sending the
-- contents of the local file "LOCAL-LOG"
f, e = ftp.put{
host = "ftp.tecgraf.puc-rio.br",
user = "diego",
password = "nehab",
host = "ftp.example.com",
user = "fulano",
password = "silva",
command = "appe",
argument = "LOG",
source = ltn12.source.file(io.open("LOCAL-LOG", "r"))