Software /
code /
prosody
Changeset
7800:dadf9ba290c5
server_epoll: Add some comments describing some functions
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 01 Jan 2017 19:42:12 +0100 |
parents | 7799:93643a61858a |
children | 7803:4d182b9a8109 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Sun Jan 01 19:41:03 2017 +0100 +++ b/net/server_epoll.lua Sun Jan 01 19:42:12 2017 +0100 @@ -572,6 +572,7 @@ 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 @@ 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 @@ 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();