一、Unity3D+LuaSocket,HTTP请求

function GetServerIpByHttp()
    local http = require("socket.http")
    local url = ""
    local c = http.request(url )
    if nil ~= c then
        _G.ServerIP = c
    else
        local message = "获取失败"
    end
end

你可能感兴趣的:(一、Unity3D+LuaSocket,HTTP请求)