This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

localhost socket stuck with specific data ?
#6
Trying to work on this but I am still keep failing....
With the status script above(with 0 sec interval), I figured out new connection is open every 10 seconds.
I guess it is because of the timeout that I set inside lutron_connect script
Code:
function lutron_connect()     local tcp = assert(socket.tcp())     tcp:settimeout(10)     local res, err = tcp:connect('172.16.1.10', 23)   if res then     return tcp   else     tcp:close()     return nil, err   end end

What I have tried with modifying status script is as below but it creates an infite roop inside LM....
Appreciate a lot if you could help.
Thank you so much!
Code:
if not tcp then   tcp, err = lutron_login()   if not tcp then     log('no connection to device', err) end end while tcp do   res, err = lutron_receive(tcp)     if (res == nil) then       return     else       log(res)     end      if (err ~= nil) then         alert('Lutron error '..err)     end end
Reply


Messages In This Thread
RE: localhost socket stuck with specific data ? - by Hadeel - 22.07.2024, 04:33

Forum Jump: