mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
Updated to remove use of global methods. Conforming to
LuaSocket release 1.2.1
This commit is contained in:
parent
27371883ef
commit
29226588da
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user