Software /
code /
prosody
Comparison
core/portmanager.lua @ 9836:e487197ba8a5
core.portmanager: Use server.listen API
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 13 Sep 2018 21:17:37 +0200 |
parent | 8555:4f0f5b49bb03 |
child | 9837:789395f027f1 |
comparison
equal
deleted
inserted
replaced
9835:20bf5b47c1fb | 9836:e487197ba8a5 |
---|---|
124 error_to_friendly_message(service_name, port_number, err) or "unknown error"); | 124 error_to_friendly_message(service_name, port_number, err) or "unknown error"); |
125 end | 125 end |
126 end | 126 end |
127 if not err then | 127 if not err then |
128 -- Start listening on interface+port | 128 -- Start listening on interface+port |
129 local handler, err = server.addserver(interface, port_number, listener, mode, ssl); | 129 local handler, err = server.listen(interface, port_number, listener, { |
130 read_size = mode, | |
131 tls_ctx = ssl, | |
132 tls_direct = service_info.encryption == "ssl"; | |
133 }); | |
130 if not handler then | 134 if not handler then |
131 log("error", "Failed to open server port %d on %s, %s", port_number, interface, | 135 log("error", "Failed to open server port %d on %s, %s", port_number, interface, |
132 error_to_friendly_message(service_name, port_number, err)); | 136 error_to_friendly_message(service_name, port_number, err)); |
133 else | 137 else |
134 table.insert(hooked_ports, "["..interface.."]:"..port_number); | 138 table.insert(hooked_ports, "["..interface.."]:"..port_number); |