diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-04-20 18:57:47 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2005-04-20 18:57:47 +0000 |
| commit | 2a00a5ad50f2ac4ed19fa6a84c59f539076e8c2a (patch) | |
| tree | 0f088bb442de1dbeba894e37da64de7f2dec166f /samples | |
| parent | 693a201db6052310206ec69fbc940c013267d866 (diff) | |
| download | luasocket-2a00a5ad50f2ac4ed19fa6a84c59f539076e8c2a.tar.gz luasocket-2a00a5ad50f2ac4ed19fa6a84c59f539076e8c2a.tar.bz2 luasocket-2a00a5ad50f2ac4ed19fa6a84c59f539076e8c2a.zip | |
Trying to get non-blocking connect to work.
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/forward.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/forward.lua b/samples/forward.lua index 0f79ee2..c213a59 100644 --- a/samples/forward.lua +++ b/samples/forward.lua | |||
| @@ -77,11 +77,11 @@ print("trying to connect peer", who, host, port) | |||
| 77 | if not ret and err == "timeout" then | 77 | if not ret and err == "timeout" then |
| 78 | print("got timeout, will wait", who) | 78 | print("got timeout, will wait", who) |
| 79 | wait(who, "output") | 79 | wait(who, "output") |
| 80 | ret, err = who:connected() | 80 | ret, err = who:connect(host, port) |
| 81 | print("connection results arrived", who, ret, err) | 81 | print("connection results arrived", who, ret, err) |
| 82 | end | 82 | end |
| 83 | if not ret then | 83 | if not ret then |
| 84 | print("connection failed", who) | 84 | print("connection failed", who, err) |
| 85 | kick(who) | 85 | kick(who) |
| 86 | kick(context[who].peer) | 86 | kick(context[who].peer) |
| 87 | else | 87 | else |
