LrSocket.bind - returns error 'Failed to open localhost'
Copy link to clipboard
Copied
I had a Lua plugin working on Windows 10 (desktop). It uses sockets (LrSocket.bind) to send a message to a python script.
Copied it to my Windows 11 laptop, made some changes. Still works on the Laptop.
I copy it back to my desktop and run it on the desktop, when the plugin tries to create a listeneing connection I get an error reported 'failed to open localhost:63000'.
Check back on Laptop - still OK.
I didn't make any changes to the 'sockets' part of the code!
On the desktop I checked that the port is free, tried a different port, disabled the firewall temporarily, but still get the same error on desktop (and runs OK on Laptop). Googled the issue and got no cluses.
Extract from the code attached (I've left out the LrTasks.startAsyncTask and LrFunctionContext.call with context for clarity, and the main message handling).
It looks like it goes straight to onError (onconnecting etc not called).
Does anyone have any clues why this error is occurring?
Thank in anticipation.
Best wishes
Terry
Copy link to clipboard
Copied
Well, I seem to have found the solution.
Changed to port 2000 and it works OK!!!
Not sure I know the issue with ports 62000?
Best wishes
Terry

