From 1fa65d89ca5dc64756f7933d7cc3f524e4627dce Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Mon, 22 Mar 2004 04:15:03 +0000 Subject: Adjusted some details, got rid of old files, added some new. --- samples/daytimeclnt.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'samples') diff --git a/samples/daytimeclnt.lua b/samples/daytimeclnt.lua index 29abe17..63f4017 100644 --- a/samples/daytimeclnt.lua +++ b/samples/daytimeclnt.lua @@ -14,8 +14,9 @@ host = socket.dns.toip(host) udp = socket.udp() print("Using host '" ..host.. "' and port " ..port.. "...") udp:setpeername(host, port) +udp:settimeout(3) sent, err = udp:send("anything") -if err then print(err) exit() end +if err then print(err) os.exit() end dgram, err = udp:receive() -if not dgram then print(err) exit() end +if not dgram then print(err) os.exit() end io.write(dgram) -- cgit v1.2.3-55-g6feb