Software /
code /
prosody
Comparison
net/connlisteners.lua @ 2281:27441b099984
Merge with tip.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sun, 29 Nov 2009 21:33:37 +0100 |
parent | 2104:466bd2cac62a |
child | 2546:cadfb455a00c |
comparison
equal
deleted
inserted
replaced
2280:0b0fe49e5251 | 2281:27441b099984 |
---|---|
59 elseif udata.ssl and udata.type == "tcp" then | 59 elseif udata.ssl and udata.type == "tcp" then |
60 error("SSL context supplied for a TCP connection!", 0); | 60 error("SSL context supplied for a TCP connection!", 0); |
61 end | 61 end |
62 end | 62 end |
63 | 63 |
64 return server.addserver(h, | 64 local interface = (udata and udata.interface) or h.default_interface or "*"; |
65 (udata and udata.port) or h.default_port or error("Can't start listener "..name.." because no port was specified, and it has no default port", 0), | 65 local port = (udata and udata.port) or h.default_port or error("Can't start listener "..name.." because no port was specified, and it has no default port", 0); |
66 (udata and udata.interface) or h.default_interface or "*", (udata and udata.mode) or h.default_mode or 1, (udata and udata.ssl) or nil, 99999999, udata and udata.type == "ssl"); | 66 local mode = (udata and udata.mode) or h.default_mode or 1; |
67 local ssl = (udata and udata.ssl) or nil; | |
68 local maxclients = 99999999; | |
69 local autossl = udata and udata.type == "ssl"; | |
70 | |
71 return server.addserver(interface, port, h, mode, ssl, autossl); | |
67 end | 72 end |
68 | 73 |
69 return _M; | 74 return _M; |