Updated to remove use of global methods. Conforming to

LuaSocket release 1.2.1
This commit is contained in:
Diego Nehab 2001-03-06 19:23:21 +00:00
parent 27371883ef
commit 29226588da

View File

@ -7,8 +7,8 @@ end
host = toip(host)
udp = udpsocket()
print("Using host '" ..host.. "' and port " ..port.. "...")
err = sendto(udp, "anything", host, port)
err = udp:sendto("anything", host, port)
if err then print(err) exit() end
dgram, err = receive(udp)
dgram, err = udp:receive()
if not dgram then print(err) exit() end
write(dgram)