diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-05-25 01:54:13 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-05-25 01:54:13 +0000 |
| commit | 0f6c8d50a99997ac7829864b1c93362b50f1bbf3 (patch) | |
| tree | d0cefe3a05484e65b7b7e79d8cae4a1d2e6d19fb /samples/daytimeclnt.lua | |
| parent | c1ef3e7103cc652d2004ef1ddc9409b946207f33 (diff) | |
| download | luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.tar.gz luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.tar.bz2 luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.zip | |
Porting to LUA 5.0 final
Diffstat (limited to 'samples/daytimeclnt.lua')
| -rw-r--r-- | samples/daytimeclnt.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 | |||
| 7 | host = socket.toip(host) | 7 | host = socket.toip(host) |
| 8 | udp = socket.udp() | 8 | udp = socket.udp() |
| 9 | print("Using host '" ..host.. "' and port " ..port.. "...") | 9 | print("Using host '" ..host.. "' and port " ..port.. "...") |
| 10 | err = udp:sendto("anything", host, port) | 10 | udp:setpeername(host, port) |
| 11 | sent, err = udp:send("anything") | ||
| 11 | if err then print(err) exit() end | 12 | if err then print(err) exit() end |
| 12 | dgram, err = udp:receive() | 13 | dgram, err = udp:receive() |
| 13 | if not dgram then print(err) exit() end | 14 | if not dgram then print(err) exit() end |
