tsNet on LC server

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
SparkOut
Posts: 2082
Joined: Sun Sep 23, 2007 4:58 pm

tsNet on LC server

Post by SparkOut » Sun Oct 30, 2016 7:56 pm

The dictionary says that tsNet library is available on server platform. How is it done to configure lc scripts to run on the server and take advantage of the networking functionality? I have uploaded the .so file in the externals folder, set permissions and added the initialisation command to the script but it still outputs errors when encountering tsNet library functions. Do I have to "start using " or anything else to make it work in lc script on server?

TorstenHolmer
Posts: 23
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Re: tsNet on LC server

Post by TorstenHolmer » Wed Jul 17, 2019 9:18 am

Hi SparkOut,

I have had the same problem. it is an error in the manual, the server has NO tsNet library. But you could use curl as a replacement. This is what my host replied as an asnwer how to use FTP with Livecode:

"If you are wanting to programmatically transfer a file to another server, one way to do so is to run curl using the shell() LiveCode handler: curl --ftp-ssl -T file.txt ftp://user:pass@example.com/dir/path/"

Cheers,
Torsten

SparkOut
Posts: 2082
Joined: Sun Sep 23, 2007 4:58 pm

Re: tsNet on LC server

Post by SparkOut » Wed Jul 17, 2019 9:02 pm

Wow Torsten, thanks for coming back to this thread with helpful details of your experience. And hi!
I actually worked around this issue ages ago (as you might expect) with shelling out - in my case using WGET, but with the same result, a shell call doing the file handling and parsing the value returned to check success.
Not much different to calling a tsNet external function, I suppose, but I would really like to stay as close to native LiveCode as possible.
Still, it's nice to hear confirmation of your similar problems with tsNet / its documentation.

Post Reply

Return to “CGIs and the Server”