[ ANN ] Release 8.1.0 DP-3
Charles Warwick
charles at techstrategies.com.au
Sat Jul 30 23:37:34 EDT 2016
On 31/07/2016 12:01 am, Matthias Rebbe wrote:
> Charles,
>
> is FTP with TLS/SSL (AUTH TLS - Explicit) also supported by your external?
Yes, FTPS is supported by the external, though you have to use the tsNet
commands directly, rather than the standard libUrl calls.
For explicit FTPS transfers, you can do something like this:
local tEmptyHeaderVar, tData, tResultHeaders, tSettings
put true into tSettings["use_ssl"]
put "some data to upload" into tData
put tsNetUploadSync("ftp://ftp.domain.com/path/to/file.dat",
tEmptyHeaderVar, tData, tResultHeaders, tSettings) into tResult
If you want to use the less common implicit transfers, you can do this
instead:
local tEmptyHeaderVar, tData, tResultHeaders, tSettings
put "some data to upload" into tData
put tsNetUploadSync("ftps://ftp.domain.com/path/to/file.dat",
tEmptyHeaderVar, tData, tResultHeaders, tSettings) into tResult
Hope that helps,
Regards,
Charles
> If so, could you add an example for that also, please?
>
> Regards,
> Matthias
>
>
>
>> Am 30.07.2016 um 12:13 schrieb Charles Warwick <charles at techstrategies.com.au <mailto:charles at techstrategies.com.au>>:
>>
>>
>> To add to what Monte has said, the tsNet external wraps around the existing libURL library as well as providing its own set of commands and functions. This provides two ways of using the external.
>>
>> Using the standard networking commands (put x into URL y, post x to URL y, load URL x, etc... ) will now automatically use the tsNet external in DP3 when using the internet library.
>>
>> There are a quite a number of benefits of tsNet, however the four most obvious benefits you will see by using it in this fashion are:
>>
>> 1. you can use SFTP URLs in the format of "sftp://user:pass@host.domain.com <sftp://user:pass@host.domain.com>".
>> 2. multiple asynchronous requests to the same server (for example when using "load URL x" commands) are processed immediately rather than sequentially as would happen previously
>> 3. a significant performance improvement particularly noticeable on large file transfers, or when executing multiple requests to the same server one after another
>> 4. all processing of data is offloaded to the external, improving responsive of the LC application to other tasks during transfers (for example, other handlers being triggered)
>>
>> However, this only gives you access to a subset of the features of the tsNet external.
>>
>> There are a range of commands and functions available in the tsNet external, all starting with "tsNet", that can be found in the LC dictionary. These give you access to the additional features like sending e-mails via SMTP(S) and comprehensive asynchronous request types that are not available using the standard internet library (for example, firing off multiple HTTP POST requests asynchronously).
>>
>> I will be adding more documentation and examples over the coming weeks to assist with using this external. In the mean time, I have uploaded a very simple sample stack that demonstrates how to send multiple HTTP POST requests in an asynchronous manner here:
>>
>> https://downloads.techstrategies.com.au/tsnet/sample_async_post.livecode <https://downloads.techstrategies.com.au/tsnet/sample_async_post.livecode>
>>
>> Hope that helps,
>>
>> Regards,
>>
>> Charles
>>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list