net/connhandlers.lua

Thu, 02 Oct 2008 01:08:58 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 02 Oct 2008 01:08:58 +0100
changeset 38
3fdfd6e0cb4e
permissions
-rw-r--r--

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 ))


local lxp = require "lxp"
local init_xmlhandlers = require "core.xmlhandlers"

module "connhandlers"


function new(name, session)
	if name == "xmpp-client" then
		local parser = lxp.new(init_xmlhandlers(session), ":");
		local parse = parser.parse;
		return { data = function (self, data) return parse(parser, data); end, parser = parser }
	end
end

return _M;

mercurial