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 ?
#3
Thank you for your reply!
OK.....I guess it is because the resident script runs lutron_login() every time?

Does this code look better?
Code:
require('user.lutron')
require('socket')
if not server then 
  server = socket.udp()
  server:setsockname('127.0.0.1', 5485)
  --server:settimeout(3)
end
data = server:receive()
if data then
  if not tcp then
    tcp, err = lutron_login()
    if tcp == nil then
      grp.checkwrite('10/0/2', true)
    else
      tcp:send(data)
      os.sleep(0.3)
    end
  end
end
Reply


Messages In This Thread
RE: localhost socket stuck with specific data ? - by Hadeel - 17.07.2024, 10:44

Forum Jump: