Repris mon client zdyndns, mais cela ne fonctionne pas encore :-(

This commit is contained in:
Christian Zufferey
2020-02-20 09:46:28 +01:00
parent 7d359f93d0
commit 89adb559ec

View File

@@ -1,27 +1,32 @@
-- Petit script pour s'inregistrer sur zdyndns
function send_zdyndns()
if verbose then print("\n 0_zdyndns.lua zf200216.1822 \n") end
if verbose then print("\n 0_zdyndns.lua zf200220.0944 \n") end
zip = wifi.sta.getip()
zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port).." "..zip
zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port+yellow_tag).." "..zip
if verbose then print("zdyndns_str: "..zdyndns_str) end
srv_zdyndns = net.createConnection(net.TCP, 0)
srv_zdyndns:on("receive", function(conn, pl)
print("receiving...")
print(pl)
end)
srv_zdyndns:on("connection", function(sck)
print("connected...")
print("sending...")
sck:send(zdyndns_str, function(sk)
sk:close()
print("close...")
end)
print("je ne sais pas quoi afire ici")
end)
srv_zdyndns:connect(zdyndns_port,zdyndns_host)
srv_zdyndns:connect(console_port,console_host)
zdyndns_str=nil zip=nil send_zdyndns=nil
if verbose then print(node.heap()) end