# HG changeset patch # User Kim Alvefur # Date 1483296132 -3600 # Node ID dadf9ba290c58dc6aa8c9542dd0eab734de5ebd8 # Parent 93643a61858a56e8b5c3f9eb101f857fca247723 server_epoll: Add some comments describing some functions diff -r 93643a61858a -r dadf9ba290c5 net/server_epoll.lua --- 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();