Files
luasocket/test
moteus addee9d8fb Add. acceptfd method.
socket.tcp can accept fd and socket type ('master'(default), 'client')

acceptfd method can be used to write multi-threaded server.
```lua
-- main thread
local fd = srv_sock:acceptfd()
Threads.runfile('echo.lua', fd)

-- echo.lua
local fd = ...
local sock = socket.tcp(fd,'client')
```

or to interact with library such as [ESL](http://wiki.freeswitch.org/wiki/Event_Socket_Library)
```lua
local fd = srv_sock:acceptfd()
Threads.runfile('worker.lua', fd)

-- worker.lua
local sock = ESLconnection((...))
```

If we need just close fd (for example we can not run worker thread) we should call `socket.tcp(fd,'client'):close()`
2013-05-30 10:55:13 +04:00
..
2006-04-03 04:45:42 +00:00
2003-03-21 23:49:18 +00:00
2006-03-19 21:22:21 +00:00
2004-07-01 05:38:44 +00:00
2003-03-21 23:49:18 +00:00
2004-12-07 20:39:02 +00:00
2006-04-02 23:24:37 +00:00
2009-05-27 09:31:38 +00:00
2004-06-21 06:07:58 +00:00
2013-05-30 10:55:13 +04:00
2013-05-27 11:26:35 +04:00
2009-05-27 09:31:38 +00:00
2004-11-27 07:58:04 +00:00
2012-08-23 19:31:15 -03:00
2012-08-23 19:31:15 -03:00
2007-04-09 22:04:13 +00:00
2007-04-09 22:04:13 +00:00
2003-03-21 23:49:18 +00:00

This provides the  automated test scripts used to make  sure the library
is working properly.

The files provided are:

    testsrvr.lua            -- test server
    testclnt.lua            -- test client

To run these tests, just run lua on the server and then on the client. 

    hello.lua               -- run to verify if installation worked

Good luck,
Diego.