Hi Tiemo,

On 2017-05-22 09:47, Tiemo Hollmann TB via use-livecode wrote:
Hello,

I feel, that I am missing some basics about URL / libUrl / tsNet.

I thought, when using the keyword "URL" like in "put URL foo into res" it has used under the hood in the past functions from libUrl. And I thought
since LC 8 or so libURL was replaced by tsNet, so when using today the
keyword URL it uses under the hood tsNet.

There are two types of URL related functionality in the engine:

  - those provided by syntax (e.g. load url, url, post etc.)

  - those provided by libUrl prefixed functions and commands.

The syntax works because the engine sends a message (such as loadUrl) through the message path to handle any occurrences of 'load url X'. The other functions
and commands because libUrl is just a library stack/backscript.

The tsNet external provides a richer set of functionality via a collection of tsNet functions and commands - the tsNet functionality is a superset of that
provided by libUrl.

When we started bundling tsNet, Charles modified the built-in libUrl so that it consists of a universal library script, and a 'driver' script - the library
script provides the public API (both for functions and syntax) and then
dispatches to a (private) driver library which actually does the work.

tsNet comes with a libUrl driver which implements the whole of libUrl's
functionality via tsNet.

If you just choose to include libUrl, then you will get the libUrl implementation (which runs using engine socket commands); if you also include tsNet, though, it will install its driver on startup; so libUrl will then be doing all its work
vai tsNet.

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to