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 ?
#5
Thank you so so much!
It works and I don't see the send delay anymore.... internal socket does not get stuck also.

I guess I am opening TCP port each time I run this resident script as well ?
I tried to edit them like you did but I am failing....could you suggest how to modify it to have only a single open connection?

Code:
require('user.lutron')
 
tcp, err = lutron_login()
if not tcp then
  log('no connection to device', err)
end
while tcp do
  res, err = lutron_receive(tcp)
  log(res,err)
    if (res == nil) then
      return
    end
end


By the way in this project we have iOS tablet app and phone app but the frontend does not have functionality to prevent user from continuously clicking on the command button.
That is why I put os.sleep(0.3) every time after sending TCP command but do you have better way to prevent high load caused by users' over-clicking ?

Thank you very much for your help as always!
Reply


Messages In This Thread
RE: localhost socket stuck with specific data ? - by Hadeel - 18.07.2024, 15:40

Forum Jump: