luasocket/test/test_bind.lua
2013-05-27 11:25:31 +04:00

6 lines
290 B
Lua

local socket = require "socket"
local u = socket.udp() assert(u:setsockname("*", 5088)) u:close()
local u = socket.udp() assert(u:setsockname("*", 0)) u:close()
local t = socket.tcp() assert(t:bind("*", 5088)) t:close()
local t = socket.tcp() assert(t:bind("*", 0)) t:close()
print("done!")