File

net/connhandlers.lua @ 77:531b981f2d17

Load roster on resource bind
author Waqas Hussain <waqas20@gmail.com>
date Wed, 08 Oct 2008 19:30:35 +0500
parent 38:3fdfd6e0cb4e
line wrap: on
line source


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;