更新时间:2023-02-21 09:18:30
尝试使用 luarocks 安装它.如果您没有 luarocks,请按照网站上的说明进行安装.
Try installing it using luarocks. If you don't have luarocks, install it following instructions on the site.
然后从luasocket repo下载rockspec文件(luasocket-scm-0.rockspec)并运行
Then download the rockspec file(luasocket-scm-0.rockspec) from luasocket repo and run
$ luarocks install *path to the rockspec file*
如果一切顺利,你就可以像这样使用 Lua 的 luasocket:
If everything goes OK, you'll be able to use luasocket from Lua like this:
local socket = require "socket"
-- now you can use socket.xxx functions