Worked on the manual.

Implemented stuffing (needs test)
Added cddb and qp examples.
This commit is contained in:
Diego Nehab 2004-02-04 14:29:11 +00:00
parent f67864f86c
commit 0b2542d1a6
37 changed files with 649 additions and 332 deletions

View file

@ -4,7 +4,7 @@ if not LUASOCKET_LIBNAME then error('module requires LuaSocket') end
local socket = _G[LUASOCKET_LIBNAME]
if not socket then error('module requires LuaSocket') end
-- create smtp namespace inside LuaSocket namespace
local smtp = {}
local smtp = socket.smtp or {}
socket.smtp = smtp
-- make all module globals fall into smtp namespace
setmetatable(smtp, { __index = _G })
@ -18,6 +18,10 @@ DOMAIN = os.getenv("SERVER_NAME") or "localhost"
-- default server used to send e-mails
SERVER = "localhost"
function stuff()
return socket.cicle(dot, 2)
end
-- tries to get a pattern from the server and closes socket on error
local function try_receiving(connection, pattern)
local data, message = connection:receive(pattern)