aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-03-22 04:15:03 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-03-22 04:15:03 +0000
commit1fa65d89ca5dc64756f7933d7cc3f524e4627dce (patch)
treedf614c8b86b0f7c2f45c2afcacc993ab3c0dcf11 /samples
parent4919a83d2271a9e43b83c7d488e3f94c850681e3 (diff)
downloadluasocket-1fa65d89ca5dc64756f7933d7cc3f524e4627dce.tar.gz
luasocket-1fa65d89ca5dc64756f7933d7cc3f524e4627dce.tar.bz2
luasocket-1fa65d89ca5dc64756f7933d7cc3f524e4627dce.zip
Adjusted some details, got rid of old files, added some new.
Diffstat (limited to 'samples')
-rw-r--r--samples/daytimeclnt.lua5
1 files changed, 3 insertions, 2 deletions
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)
14udp = socket.udp() 14udp = socket.udp()
15print("Using host '" ..host.. "' and port " ..port.. "...") 15print("Using host '" ..host.. "' and port " ..port.. "...")
16udp:setpeername(host, port) 16udp:setpeername(host, port)
17udp:settimeout(3)
17sent, err = udp:send("anything") 18sent, err = udp:send("anything")
18if err then print(err) exit() end 19if err then print(err) os.exit() end
19dgram, err = udp:receive() 20dgram, err = udp:receive()
20if not dgram then print(err) exit() end 21if not dgram then print(err) os.exit() end
21io.write(dgram) 22io.write(dgram)