我正在尝试为接收UDP数据编写这种方式.IN套接字编程。它不起作用
local socket = require("socket")
udp = socket.udp()
udp:setsockname("*",56000)
udp:settimeout(0)
while true do
data, ip, port = udp:receivefrom()
if data then
print("Received:",data,ip,port)
udp:sendto(data, ip, port)
end
socket.sleep(1)
end