net/connhandlers.lua
author Matthew Wild <mwild1@gmail.com>
Wed, 01 May 2013 13:54:44 +0100
branchtls
changeset 5556 7407b1160b46
parent 38 3fdfd6e0cb4e
permissions -rw-r--r--
Close 'tls' branch


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;