File: 20-listen-dgram.lua

package info (click to toggle)
lua-cqueues 20161214-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,672 kB
  • ctags: 3,228
  • sloc: ansic: 20,232; sh: 2,959; makefile: 24
file content (19 lines) | stat: -rwxr-xr-x 289 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
_=[[
	. "${0%%/*}/regress.sh"
	exec runlua "$0" "$@"
]]
require"regress".export".*"

local main = cqueues.new()

main:wrap(function ()
	local con = socket.listen{ host = "127.0.0.1", port = 0, type = socket.SOCK_DGRAM }

	check(con:listen())
end)

check(main:loop())

say("OK")