New agnostic IPv4 IPv6 functions.

Also dealing with EPROTOTYPE Yosemite seems to be throwing
at us for no reason.
This commit is contained in:
Diego Nehab 2015-08-22 19:52:01 -03:00
parent b211838648
commit 96965b179c
14 changed files with 399 additions and 352 deletions

View file

@ -1,7 +1,7 @@
local socket = require"socket"
local udp = socket.udp
local localhost = "127.0.0.1"
local port = arg[1]
local port = assert(arg[1], "missing port argument")
se = udp(); se:setoption("reuseaddr", true)
se:setsockname(localhost, 5062)