net/connhandlers.lua

changeset 38
3fdfd6e0cb4e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/net/connhandlers.lua	Thu Oct 02 01:08:58 2008 +0100
@@ -0,0 +1,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;
\ No newline at end of file

mercurial