...and this is a simple server:
`local socket = require("socket")
udp = socket.udp()
udp:setsockname("*", 12345)
-- nil or a negative value blocks indefinitely:
udp:settimeout(10)
while true do
data, ip, port = udp:receivefrom()
if data then
print("Received: ", data, ip, port)
udp:sendto(data, ip, port)
end
socket.sleep(0.01)
end`