From 0f6c8d50a99997ac7829864b1c93362b50f1bbf3 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Sun, 25 May 2003 01:54:13 +0000 Subject: Porting to LUA 5.0 final --- samples/daytimeclnt.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'samples/daytimeclnt.lua') diff --git a/samples/daytimeclnt.lua b/samples/daytimeclnt.lua index 000dfd5..4debc81 100644 --- a/samples/daytimeclnt.lua +++ b/samples/daytimeclnt.lua @@ -7,7 +7,8 @@ end host = socket.toip(host) udp = socket.udp() print("Using host '" ..host.. "' and port " ..port.. "...") -err = udp:sendto("anything", host, port) +udp:setpeername(host, port) +sent, err = udp:send("anything") if err then print(err) exit() end dgram, err = udp:receive() if not dgram then print(err) exit() end -- cgit v1.2.3-55-g6feb