aboutsummaryrefslogtreecommitdiffstats
path: root/net
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
commit31116c6f6ccfa91b67c01b14408e6961cdfb6960 (patch)
tree819ad61f75e3b852648c293b080850b63599fdcf /net
parent5ba909818d0f15533286bbb6946d0638e46051d5 (diff)
downloadprosody-31116c6f6ccfa91b67c01b14408e6961cdfb6960.tar.gz
prosody-31116c6f6ccfa91b67c01b14408e6961cdfb6960.zip
server_epoll: Add some comments describing some functions
Diffstat (limited to 'net')
-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();