lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On May 04, 2006, at 16:18, Hisham Muhammad wrote:

Now, to get really off topic, what shall we do about 'every program
evolves until it is powerful enough to read mail'? :-)

Well, once something is already Lua-extensible, it's just a matter of
'require'ing a POP3 module, isn't it? ;-)

Talking of which, here is a goofy SMTP server implemented in Lua:

local SMTPServer = require( "SMTPServer" )
local SMTPDelegate = require( "SMTPDelegate" )

local aServer = SMTPServer( 1025 )

aServer:setDelegate( SMTPDelegate )


The server handles the SMTP particularities and let the delegate drive the underlying logic by implementing optional methods (e.g. smtpWillAuthenticate, smtpWillAddSender, smtpWillAddRecipient, smtpWillAddData, etc).


PA, Onnay Equitursay