Comparison

plugins/mod_bosh.lua @ 2467:8098310d0dfd

mod_bosh: Update for new xmlhandlers syntax
author Matthew Wild <mwild1@gmail.com>
date Tue, 19 Jan 2010 03:57:19 +0000
parent 2373:13090fc6ad90
child 2473:3f4cfa375bd6
comparison
equal deleted inserted replaced
2466:0e44b6035210 2467:8098310d0dfd
21 local st = require "util.stanza"; 21 local st = require "util.stanza";
22 local logger = require "util.logger"; 22 local logger = require "util.logger";
23 local log = logger.init("mod_bosh"); 23 local log = logger.init("mod_bosh");
24 24
25 local xmlns_bosh = "http://jabber.org/protocol/httpbind"; -- (hard-coded into a literal in session.send) 25 local xmlns_bosh = "http://jabber.org/protocol/httpbind"; -- (hard-coded into a literal in session.send)
26 local stream_callbacks = { stream_tag = "http://jabber.org/protocol/httpbind\1body", default_ns = xmlns_bosh }; 26 local stream_callbacks = { stream_ns = "http://jabber.org/protocol/httpbind", stream_tag = "body", default_ns = xmlns_bosh };
27 27
28 local BOSH_DEFAULT_HOLD = tonumber(module:get_option("bosh_default_hold")) or 1; 28 local BOSH_DEFAULT_HOLD = tonumber(module:get_option("bosh_default_hold")) or 1;
29 local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60; 29 local BOSH_DEFAULT_INACTIVITY = tonumber(module:get_option("bosh_max_inactivity")) or 60;
30 local BOSH_DEFAULT_POLLING = tonumber(module:get_option("bosh_max_polling")) or 5; 30 local BOSH_DEFAULT_POLLING = tonumber(module:get_option("bosh_max_polling")) or 5;
31 local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) or 2; 31 local BOSH_DEFAULT_REQUESTS = tonumber(module:get_option("bosh_max_requests")) or 2;