Mush里可以用LUA脚本通过Socket或Http等方式与其它程序通讯吗?
能给个栗子吗?北大侠客行MUD,中国最好的MUD 发送的搞定,不过接收的咋弄呢?local socket = require("socket")
local host = "127.0.0.1"
local port = 1234
local sock = assert(socket.connect(host, port))
sock:settimeout(0)
sock:send(input .. "\n") 接收的
recvt, sendt, status = socket.select({sock}, nil, 1)
while #recvt==0 do
wait.time(2)
recvt, sendt, status = socket.select({sock}, nil, 1)
end
response, receive_status = sock:receive()
print(response) 自问自答标准贴!
页:
[1]