Yeah, mon client zdyndns commence enfin à fonctionner, maintenant il faut nettoyer tout le code de debug ;-)
This commit is contained in:
@@ -10,7 +10,7 @@ socat TCP-LISTEN:23047,reuseaddr,fork TCP-LISTEN:24047,reuseaddr,bind=127.0.0.1
|
||||
telnet -r localhost 24047
|
||||
]]
|
||||
|
||||
print("\n 0_tst3_socat.lua zf200219.1621 \n")
|
||||
print("\n 0_tst3_socat.lua zf200220.0926 \n")
|
||||
|
||||
local node, table, tmr, wifi, uwrite, tostring =
|
||||
node, table, tmr, wifi, uart.write, tostring
|
||||
@@ -135,6 +135,7 @@ rt_connect()
|
||||
|
||||
|
||||
--[[
|
||||
tmr_socat1:unregister()
|
||||
for k,v in pairs(_G) do print(k,v) end
|
||||
|
||||
print(srv_rt:getpeer())
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
-- Petit script pour s'inregistrer sur zdyndns
|
||||
|
||||
function send_zdyndns()
|
||||
if verbose then print("\n 0_zdyndns.lua zf200220.0944 \n") end
|
||||
if verbose then print("\n 0_zdyndns.lua zf200221.1202 \n") end
|
||||
|
||||
zip = wifi.sta.getip()
|
||||
zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port+yellow_tag).." "..zip
|
||||
if verbose then print("zdyndns_str: "..zdyndns_str) end
|
||||
|
||||
zdyndns_str = "s "..node_id..","..console_host..":"..tostring(console_port+yellow_tag).." "..zip.."\n"
|
||||
if verbose then print("zdyndns_str: /"..zdyndns_str.."/") end
|
||||
|
||||
srv_zdyndns = net.createConnection(net.TCP, 0)
|
||||
|
||||
@@ -18,17 +17,18 @@ function send_zdyndns()
|
||||
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
|
||||
sck:send(zdyndns_str, function(sk)
|
||||
sk:close()
|
||||
print("close...")
|
||||
end)
|
||||
zdyndns_str=nil zip=nil send_zdyndns=nil
|
||||
end)
|
||||
|
||||
srv_zdyndns:connect(zdyndns_port,zdyndns_host)
|
||||
|
||||
|
||||
|
||||
zdyndns_str=nil zip=nil send_zdyndns=nil
|
||||
if verbose then print(node.heap()) end
|
||||
collectgarbage()
|
||||
if verbose then print(node.heap()) end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- Scripts à charger après le boot pour démarrer son projet
|
||||
|
||||
print("\n boot.lua zf200217.0423 \n")
|
||||
print("\n boot.lua zf200221.1133 \n")
|
||||
|
||||
function boot()
|
||||
verbose = true
|
||||
@@ -13,7 +13,7 @@ function boot()
|
||||
--f="0_cron.lua" if file.exists(f) then dofile(f) end
|
||||
|
||||
f="0_btn_flipflop.lua" if file.exists(f) then dofile(f) end
|
||||
f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end
|
||||
--f="0_tst3_socat.lua" if file.exists(f) then dofile(f) end
|
||||
|
||||
--f = "web_ide2.lua" if file.exists(f) then dofile(f) end
|
||||
print("verbose:",verbose)
|
||||
|
||||
Reference in New Issue
Block a user