Comparison

net/http/server.lua @ 7084:fdbe9ccac17d

net.http.server: Return from listen_on() whatever net.server.addserver() returns
author Kim Alvefur <zash@zash.se>
date Sat, 16 Jan 2016 22:43:11 +0100
parent 6963:e3be91ccca05
child 7489:d32406f27efd
comparison
equal deleted inserted replaced
7083:ac920b0f9eae 7084:fdbe9ccac17d
292 function _M.remove_handler(event, handler) 292 function _M.remove_handler(event, handler)
293 events.remove_handler(event, handler); 293 events.remove_handler(event, handler);
294 end 294 end
295 295
296 function _M.listen_on(port, interface, ssl) 296 function _M.listen_on(port, interface, ssl)
297 addserver(interface or "*", port, listener, "*a", ssl); 297 return addserver(interface or "*", port, listener, "*a", ssl);
298 end 298 end
299 function _M.add_host(host) 299 function _M.add_host(host)
300 hosts[host] = true; 300 hosts[host] = true;
301 end 301 end
302 function _M.remove_host(host) 302 function _M.remove_host(host)