File: ex7.lua

package info (click to toggle)
luasocket 3.0~rc1%2Bgit%2Bac3201d-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 2,216 kB
  • sloc: ansic: 4,487; makefile: 320; sh: 116
file content (16 lines) | stat: -rw-r--r-- 230 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function sink.table(t)
  t = t or {}
  local f = function(chunk, err)
    if chunk then table.insert(t, chunk) end
    return 1
  end
  return f, t
end

local function null()
  return 1
end

function sink.null()
  return null
end