aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-01 19:42:12 +0100
committerKim Alvefur <zash@zash.se>2017-01-01 19:42:12 +0100
commitcf321839ed4c3b7e10969081d3a749a5e04e509b (patch)
tree819ad61f75e3b852648c293b080850b63599fdcf
parent031644817772f0c7bb4e177d67e80f7922b0e9c1 (diff)
downloadprosody-cf321839ed4c3b7e10969081d3a749a5e04e509b.tar.gz
prosody-cf321839ed4c3b7e10969081d3a749a5e04e509b.zip
server_epoll: Add some comments describing some functions
-rw-r--r--net/server_epoll.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 3173b820..7a62b03c 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -572,6 +572,7 @@ local function wrapclient(conn, addr, port, listeners, pattern, tls)
return client;
end
+-- New outgoing TCP connection
local function addclient(addr, port, listeners, pattern, tls)
local conn, err = socket.tcp();
if not conn then return conn, err; end
@@ -582,6 +583,7 @@ local function addclient(addr, port, listeners, pattern, tls)
return client, conn;
end
+-- Dump all data from one connection into another
local function link(from, to)
from.listeners = setmetatable({
onincoming = function (_, data)
@@ -604,6 +606,7 @@ function interface:set_send(new_send)
self.send = new_send;
end
+-- Close all connections and servers
local function closeall()
for fd, conn in pairs(fds) do -- luacheck: ignore 213/fd
conn:close();