怎样在Lua中收获本机名和本机IP地址葡京网站spj3355

local socket = require('socket')
local MyHostName = socket.dns.gethostname() --本机名
local MyIP = socket.dns.toip(MyHostName)    --本机IP