mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-09 08:25:48 -07:00
Fixes an issue on macOS Mojave that was patched in fa1c281e79.
The list of changes can be found under
build/premake/premake5/CHANGES.txt.
This was SVN commit r22021.
16 lines
533 B
Lua
16 lines
533 B
Lua
local socket = require"socket"
|
|
local udp = socket.udp
|
|
local localhost = "127.0.0.1"
|
|
local s = assert(udp())
|
|
assert(tostring(s):find("udp{unconnected}"))
|
|
print("setpeername", s:setpeername(localhost, 5061))
|
|
print("getsockname", s:getsockname())
|
|
assert(tostring(s):find("udp{connected}"))
|
|
print(s:receive())
|
|
print("setpeername", s:setpeername("*"))
|
|
print("getsockname", s:getsockname())
|
|
s:sendto("a", localhost, 12345)
|
|
print("getsockname", s:getsockname())
|
|
assert(tostring(s):find("udp{unconnected}"))
|
|
print(s:receivefrom())
|
|
s:close()
|