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
2012-08-23 19:31:15 -03:00
2013-05-30 10:55:13 +04:00
2013-05-30 10:55:13 +04:00
2013-05-27 20:30:06 +08:00
2011-05-25 20:57:22 +00:00
2012-04-23 00:18:45 +08:00
2013-05-25 07:25:02 -03:00
2013-05-27 20:30:06 +08:00
2013-05-27 20:30:06 +08:00
2013-05-26 15:18:13 +08:00
2013-05-25 18:07:38 +08:00
2012-04-23 00:18:45 +08:00
2013-05-25 18:07:38 +08:00
2011-05-25 20:57:22 +00:00
2012-04-23 00:18:45 +08:00
2012-12-10 15:50:44 -02:00
2013-05-25 18:10:46 +08:00
2007-03-12 04:08:40 +00:00

This is the LuaSocket 2.1. It has been tested on --[[WinXP--]], Mac OS X,
and --[[Linux--]].  Please use the Lua mailing list to report any bugs 
(or "features") you encounter. 

Have fun,
Diego Nehab.
Description
Network support for the Lua language
Readme MIT 3.5 MiB
Languages
HTML 48.5%
C 27.1%
Lua 22.7%
Makefile 1.5%