Update api path, add global table (#16)
This commit is contained in:
@@ -171,7 +171,6 @@ do--httpRequest
|
||||
httpRequest=
|
||||
client and function(tick,path,method,header,body)
|
||||
local task,err=client.httpraw{
|
||||
-- url="http://47.103.200.40/"..path,
|
||||
url="http://krakens.tpddns.cn:10026"..path,
|
||||
method=method or"GET",
|
||||
header=header,
|
||||
@@ -187,6 +186,25 @@ do--httpRequest
|
||||
function()
|
||||
LOG.print("[NO NETlib]",5,COLOR.yellow)
|
||||
end
|
||||
|
||||
wsConnect=
|
||||
client and function(tick,path,header)
|
||||
local task,err=client.wsraw{
|
||||
-- url="http://krakens.tpddns.cn:10026"..path,
|
||||
url="ws://127.0.0.1:10026"..path,
|
||||
origin = "127.0.0.1",
|
||||
header=header,
|
||||
}
|
||||
if task then
|
||||
TASK.new(tick,{wsconntask=task,time=0,net=true})
|
||||
else
|
||||
LOG.print("NETlib error: "..err,"warn")
|
||||
end
|
||||
TASK.netTaskCount=TASK.netTaskCount+1
|
||||
end or
|
||||
function()
|
||||
LOG.print("[NO NETlib]",5,COLOR.yellow)
|
||||
end
|
||||
end
|
||||
do--json
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user