aboutsummaryrefslogtreecommitdiffstats
path: root/net/connhandlers.lua
blob: 493f194600b05ce774cddae91c0aa6db910bf889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

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;