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 ?
#7
Try this:
Code:
if not tcp then
  tcp, err = lutron_login()
  if not tcp then
    log('no connection to device', err)
    os.sleep(5)
  end
end

while tcp do
  res, err = lutron_receive(tcp)

  if res then
    log(res)
  elseif err == 'closed' then
    tcp:close()
    tcp = nil
  end
end
Reply


Messages In This Thread
RE: localhost socket stuck with specific data ? - by admin - 22.07.2024, 05:27

Forum Jump: