Software / code / prosody
Annotate
net/connhandlers.lua @ 64:bcd0a3975580
Convert spaces->tabs
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 05 Oct 2008 02:48:39 +0100 |
| parent | 38:3fdfd6e0cb4e |
| rev | line source |
|---|---|
| 38 | 1 |
| 2 local lxp = require "lxp" | |
| 3 local init_xmlhandlers = require "core.xmlhandlers" | |
| 4 | |
| 5 module "connhandlers" | |
| 6 | |
| 7 | |
| 8 function new(name, session) | |
| 9 if name == "xmpp-client" then | |
| 10 local parser = lxp.new(init_xmlhandlers(session), ":"); | |
| 11 local parse = parser.parse; | |
| 12 return { data = function (self, data) return parse(parser, data); end, parser = parser } | |
| 13 end | |
| 14 end | |
| 15 | |
| 16 return _M; |