Diff

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
line wrap: on
line diff
--- a/net/server.lua	Wed Aug 10 16:50:13 2016 +0200
+++ b/net/server.lua	Wed Aug 10 16:51:38 2016 +0200
@@ -62,7 +62,8 @@
 		server.changesettings(select_settings);
 	end
 else
-	error("Unsupported server type")
+	server = require("net.server_"..server_type);
+	set_config = server.set_config;
 end
 
 -- If server.hook_signal exists, replace signal.signal()