Changeset

492:22844ac3be4e

server: Import one of Prosodys net.server implementations Wraps up this behavior in a new module.
author Kim Alvefur <zash@zash.se>
date Wed, 21 Jun 2023 12:21:09 +0200
parents 491:edf078a58f25
children 493:08e5c8637fea
files init.lua server.lua squishy
diffstat 3 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/init.lua	Tue Jun 20 12:59:24 2023 +0100
+++ b/init.lua	Wed Jun 21 12:21:09 2023 +0200
@@ -7,7 +7,7 @@
 -- Load LuaSec if available
 pcall(require, "ssl");
 
-local server = require "prosody.net.server_select";
+local server = require "verse.server";
 package.loaded["prosody.net.server"] = server; -- XXX
 local events = require "prosody.util.events";
 local logger = require "prosody.util.logger";
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server.lua	Wed Jun 21 12:21:09 2023 +0200
@@ -0,0 +1,5 @@
+local have_epoll, server_epoll = pcall(require, "prosody.net.server_epoll");
+if have_epoll then return server_epoll; end
+
+local server_select = require "prosody.net.server_select";
+return server_select;
--- a/squishy	Tue Jun 20 12:59:24 2023 +0100
+++ b/squishy	Wed Jun 21 12:21:09 2023 +0200
@@ -105,6 +105,8 @@
 	VerseModule("verse.plugins."..plugin)("plugins/"..plugin..".lua")
 end
 
+VerseModule "verse.server" "server.lua"
+
 -- SASL client mechanisms	
 VerseModule "verse.util.sasl.scram"       "util/sasl/scram.lua"
 VerseModule "verse.util.sasl.plain"       "util/sasl/plain.lua"