mirror of
https://github.com/lunarmodules/luasocket.git
synced 2026-01-15 00:10:30 +01:00
Change. socket:setfd return previews `fd` value. Change. socket.tcp and socket.udp can create object based on `fd`. Add. test setfd ```lua ---- server cli = assert(srv:accept()) -- test if worker thread take ownership and clear `fd` if run_worker_thread(cli:getfd()) then cli:setfd() end cli:close() ---- worker -- wrap raw `fd` to socket object local sock = socket.tcp(..., "client") -- do work with sock object ```
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.