file transfer over sockets

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: file transfer over sockets

Post by MaxV » Wed Jan 31, 2018 3:00 pm

This attachment show how to work with sockets, to me works also with big files.
Attachments
Sockets.zip
(3.88 KiB) Downloaded 196 times
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

windowsLC
Posts: 26
Joined: Sat Dec 16, 2017 5:58 am

Re: file transfer over sockets

Post by windowsLC » Sun Feb 04, 2018 1:42 am

I got as far as sending medium size files and it works just fine. Your 1meg will be no problem. What I meant earlier in the thread was if your file sizes start approaching sizes you wouldn't want to be loading fully into memory. In such a case what you can do is read out chunks and send those chunks, adding them into a file on the other side so you are avoiding the overhead of having the whole file in memory on both sides.

I am wondering if there is some way to do a http file transfer between two livecode programs. I know you can make a http server, but I have not seen any examples that take it to the level of serving non html files.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”