Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 701:dc67e3cffff4
BOSH: Allow BOSH servers to be configured through config file
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 13 Jan 2009 05:55:31 +0000 |
parent | 693:d8b793e612a9 |
child | 725:96110075288b |
comparison
equal
deleted
inserted
replaced
700:9666ad50a353 | 701:dc67e3cffff4 |
---|---|
251 inactive_sessions[session] = nil; | 251 inactive_sessions[session] = nil; |
252 end | 252 end |
253 end | 253 end |
254 end | 254 end |
255 | 255 |
256 httpserver.new{ port = 5280, base = "http-bind", handler = handle_request, ssl = false} | 256 local ports = config.get(module.host, "core", "bosh_ports") or { 5280 }; |
257 for _, options in ipairs(ports) do | |
258 local port, base, ssl, interface = 5280, "http-bind", false, nil; | |
259 if type(options) == "number" then | |
260 port = options; | |
261 elseif type(options) == "table" then | |
262 port, base, ssl, interface = options.port or 5280, options.path or "http-bind", options.ssl or false, options.interface; | |
263 elseif type(options) == "string" then | |
264 base = options; | |
265 end | |
266 httpserver.new{ port = port, base = base, handler = handle_request, ssl = ssl } | |
267 end | |
268 | |
257 server.addtimer(on_timer); | 269 server.addtimer(on_timer); |