Thu, 02 Oct 2008 01:08:58 +0100
SASL!
(but before you get too excited, no resource binding yet. And yes, there are still plenty of rough edges to the code...)
((eg. must move <stream:features> out of xmlhandlers.lua o_O ))
38 | 1 | |
2 | local lxp = require "lxp" | |
3 | local init_xmlhandlers = require "core.xmlhandlers" | |
4 | ||
5 | module "connhandlers" | |
6 | ||
7 | ||
8 | function new(name, session) | |
9 | if name == "xmpp-client" then | |
10 | local parser = lxp.new(init_xmlhandlers(session), ":"); | |
11 | local parse = parser.parse; | |
12 | return { data = function (self, data) return parse(parser, data); end, parser = parser } | |
13 | end | |
14 | end | |
15 | ||
16 | return _M; |