Voilà mon client zdyndns est prêt, faut voir encore maintenant comment l'utiliser ;-)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
-- Petit script pour s'inregistrer sur zdyndns
|
||||
|
||||
function send_zdyndns()
|
||||
if verbose then print("\n 0_zdyndns.lua zf200221.1202 \n") end
|
||||
if verbose then print("\n 0_zdyndns.lua zf200221.1209 \n") end
|
||||
|
||||
zip = wifi.sta.getip()
|
||||
zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port+yellow_tag).." "..zip.."\n"
|
||||
@@ -15,23 +15,19 @@ function send_zdyndns()
|
||||
end)
|
||||
|
||||
srv_zdyndns:on("connection", function(sck)
|
||||
print("connected...")
|
||||
print("sending...")
|
||||
print("server: ",zdyndns_port,zdyndns_host)
|
||||
if verbose then print("zdyndns_str: /"..zdyndns_str.."/") end
|
||||
if verbose then print("connected & sending...") end
|
||||
sck:send(zdyndns_str, function(sk)
|
||||
sk:close()
|
||||
print("close...")
|
||||
sk:close()
|
||||
if verbose then print("close...") end
|
||||
zdyndns_str=nil zip=nil srv_zdyndns=nil send_zdyndns=nil
|
||||
if verbose then print(node.heap()) end
|
||||
collectgarbage()
|
||||
if verbose then print(node.heap()) end
|
||||
end)
|
||||
zdyndns_str=nil zip=nil send_zdyndns=nil
|
||||
end)
|
||||
|
||||
srv_zdyndns:connect(zdyndns_port,zdyndns_host)
|
||||
|
||||
|
||||
if verbose then print(node.heap()) end
|
||||
collectgarbage()
|
||||
if verbose then print(node.heap()) end
|
||||
end
|
||||
|
||||
send_zdyndns()
|
||||
|
||||
Reference in New Issue
Block a user