Comparison

net/server.lua @ 7545:0941b3ab77c0

net.server: Allow arbitrary network backends to be configured
author Kim Alvefur <zash@zash.se>
date Wed, 10 Aug 2016 16:51:38 +0200
parent 7544:fb68aad9dc4d
child 7546:9606a99f8617
comparison
equal deleted inserted replaced
7544:fb68aad9dc4d 7545:0941b3ab77c0
60 select_settings[k] = settings[k] or default; 60 select_settings[k] = settings[k] or default;
61 end 61 end
62 server.changesettings(select_settings); 62 server.changesettings(select_settings);
63 end 63 end
64 else 64 else
65 error("Unsupported server type") 65 server = require("net.server_"..server_type);
66 set_config = server.set_config;
66 end 67 end
67 68
68 -- If server.hook_signal exists, replace signal.signal() 69 -- If server.hook_signal exists, replace signal.signal()
69 local has_signal, signal = pcall(require, "util.signal"); 70 local has_signal, signal = pcall(require, "util.signal");
70 if has_signal then 71 if has_signal then