diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2002-12-03 07:20:34 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2002-12-03 07:20:34 +0000 |
| commit | 7da19138e37c4e0123860f1fecbceb80c3d2627d (patch) | |
| tree | 8453f003a9ba212807d9c9590c2f2b850d323f0f /test/testsrvr.lua | |
| parent | d7e80592a69c076991ed4f4cc15d5390e14d1f0b (diff) | |
| download | luasocket-7da19138e37c4e0123860f1fecbceb80c3d2627d.tar.gz luasocket-7da19138e37c4e0123860f1fecbceb80c3d2627d.tar.bz2 luasocket-7da19138e37c4e0123860f1fecbceb80c3d2627d.zip | |
Faltam testes de ftp e smtp. O resto passa.
Diffstat (limited to 'test/testsrvr.lua')
| -rw-r--r-- | test/testsrvr.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/testsrvr.lua b/test/testsrvr.lua index 227e341..141c058 100644 --- a/test/testsrvr.lua +++ b/test/testsrvr.lua | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | HOST = HOST or "localhost" | 1 | HOST = HOST or "localhost" |
| 2 | PORT = PORT or "8080" | 2 | PORT = PORT or "8080" |
| 3 | 3 | ||
| 4 | server, error = bind(HOST, PORT) | 4 | server, error = socket.bind(HOST, PORT) |
| 5 | if not server then print("server: " .. tostring(error)) exit() end | 5 | if not server then print("server: " .. tostring(error)) os.exit() end |
| 6 | while 1 do | 6 | while 1 do |
| 7 | print("server: waiting for client connection..."); | 7 | print("server: waiting for client connection..."); |
| 8 | control = server:accept() | 8 | control = server:accept() |
| @@ -19,6 +19,6 @@ while 1 do | |||
| 19 | print("server: closing connection...") | 19 | print("server: closing connection...") |
| 20 | break | 20 | break |
| 21 | end | 21 | end |
| 22 | dostring(command) | 22 | (loadstring(command))() |
| 23 | end | 23 | end |
| 24 | end | 24 | end |
