Re: Email via IMAP with HTML body from a template

2022-08-11 Thread Charles Warwick via use-livecode
Sorry, the last line of the replacement code should have been:

put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”) into tBody

(It was missing the "into tBody" at the end of the line)

> On 11 Aug 2022, at 4:17 pm, Charles Warwick  
> wrote:
> 
> Hi Sean,
> 
> After reading your second e-mail, I see that you don't want to use 
> mimeEncodeFieldAsMIMEMultipartDocument to generate the HTML version of the 
> e-mail body from a field as it does in that sample stack.
> 
> If you want to create your own HTML and plain text versions of the e-mail 
> body, you can still use that sample stack.  Simply replace the following line:
> 
> put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field 
> "email_message") into tBody
> 
> With something like this:
> 
> put “Content-Type: text/plain; charset=UTF-8” & crlf into tHeadersPlain
> put “Content-Transfer-Encoding: quoted-printable” after tHeadersPlain
> put “” into tBodyPlain
> put tHeadersPlain & crlf & crlf & \
> mimeEncodeForMIMETransfer(tBodyPlain, “quoted-printable”) into tContent[1]
> 
> put “Content-Type: text/html; charset=UTF-8” & crlf into tHeadersHTML
> put “Content-Transfer-Encoding: quoted-printable” after tHeadersHTML
> put “” into tBodyHTML
> put tHeadersHTML & crlf & crlf & \
> mimeEncodeForMIMETransfer(tBodyHTML, “quoted-printable”) into tContent[2]
> 
> put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”)
> 
> Hope that helps,
> 
> Regards,
> 
> Charles
> 
>> On 11 Aug 2022, at 3:46 pm, Charles Warwick  
>> wrote:
>> Hi Sean,
>> There is a sample stack on my website for sending an e-mail with an 
>> attachment using the MIME library here:
>> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode
>> Does that help at all,
>> Regards,
>> Charles
 On 11 Aug 2022, at 2:39 pm, Tom Glod via use-livecode 
  wrote:
>>> Sean,
>>> Try this ..
>>> edit the script of stack "com.livecode.library.mime"
>>> there seems to be some documentation there that may help.
>>> I also found this
>>> https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument
>>> Is that your comment? :)
>>> Hope that helps a bit.
 On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode <
 use-livecode@lists.runrev.com> wrote:
 Hi all,
 I'm struggling with this still. It's been years (since before Dec 2020) and
 I just can't get my head around it.
 I have a template created in Dreamweaver that is a simple bit of HTML body
 with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html).
 There is also a pdf that needs to be attached.
 How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send via
 tsNetSmtpSync?
 There are zero tutorials and the dictionary is devoid of any useful
 information on how to use it. Google turned up nothing. In my previous
 request back in 2020, Monte, the author of the MIME library, had only
 referred me on to the RSC docs for MIME which is like looking for a straw
 in a needle stack. When I asked at one of the 'Firesides' I was told just
 to use a template and send it. But to send it, it needs to be encoded and
 that's the bit that is undocumented anywhere.
 Any help appreciated.
 ___
 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
>>> ___
>>> 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


___
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


Re: Email via IMAP with HTML body from a template

2022-08-11 Thread Charles Warwick via use-livecode
Hi Sean,

After reading your second e-mail, I see that you don't want to use 
mimeEncodeFieldAsMIMEMultipartDocument to generate the HTML version of the 
e-mail body from a field as it does in that sample stack.

If you want to create your own HTML and plain text versions of the e-mail body, 
you can still use that sample stack.  Simply replace the following line:

put mimeEncodeFieldAsMIMEMultipartDocument(the long id of field 
"email_message") into tBody

With something like this:

put “Content-Type: text/plain; charset=UTF-8” & crlf into tHeadersPlain
put “Content-Transfer-Encoding: quoted-printable” after tHeadersPlain
put “” into tBodyPlain
put tHeadersPlain & crlf & crlf & \
mimeEncodeForMIMETransfer(tBodyPlain, “quoted-printable”) into tContent[1]

put “Content-Type: text/html; charset=UTF-8” & crlf into tHeadersHTML
put “Content-Transfer-Encoding: quoted-printable” after tHeadersHTML
put “” into tBodyHTML
put tHeadersHTML & crlf & crlf & \
mimeEncodeForMIMETransfer(tBodyHTML, “quoted-printable”) into tContent[2]

put mimeEncodeAsMIMEMultipartDocument(tContent, “alernative”)

Hope that helps,

Regards,

Charles

> On 11 Aug 2022, at 3:46 pm, Charles Warwick  
> wrote:
> 
> Hi Sean,
> 
> There is a sample stack on my website for sending an e-mail with an 
> attachment using the MIME library here:
> 
> https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode
> 
> Does that help at all,
> 
> Regards,
> 
> Charles
> 
>> On 11 Aug 2022, at 2:39 pm, Tom Glod via use-livecode 
>>  wrote:
>> 
>> Sean,
>> 
>> Try this ..
>> 
>> edit the script of stack "com.livecode.library.mime"
>> 
>> there seems to be some documentation there that may help.
>> 
>> I also found this
>> 
>> https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument
>> 
>> Is that your comment? :)
>> 
>> Hope that helps a bit.
>> 
>> 
>> 
>>> On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> Hi all,
>>> I'm struggling with this still. It's been years (since before Dec 2020) and
>>> I just can't get my head around it.
>>> I have a template created in Dreamweaver that is a simple bit of HTML body
>>> with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html).
>>> There is also a pdf that needs to be attached.
>>> How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send via
>>> tsNetSmtpSync?
>>> There are zero tutorials and the dictionary is devoid of any useful
>>> information on how to use it. Google turned up nothing. In my previous
>>> request back in 2020, Monte, the author of the MIME library, had only
>>> referred me on to the RSC docs for MIME which is like looking for a straw
>>> in a needle stack. When I asked at one of the 'Firesides' I was told just
>>> to use a template and send it. But to send it, it needs to be encoded and
>>> that's the bit that is undocumented anywhere.
>>> Any help appreciated.
>>> ___
>>> 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
>> ___
>> 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


___
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


Re: Email via IMAP with HTML body from a template

2022-08-10 Thread Charles Warwick via use-livecode
Hi Sean,

There is a sample stack on my website for sending an e-mail with an attachment 
using the MIME library here:

https://downloads.techstrategies.com.au/tsnet/smtpexample.livecode

Does that help at all,

Regards,

Charles

> On 11 Aug 2022, at 2:39 pm, Tom Glod via use-livecode 
>  wrote:
> 
> Sean,
> 
> Try this ..
> 
> edit the script of stack "com.livecode.library.mime"
> 
> there seems to be some documentation there that may help.
> 
> I also found this
> 
> https://livecode.fandom.com/wiki/MimeEncodeAsMIMEMultipartDocument
> 
> Is that your comment? :)
> 
> Hope that helps a bit.
> 
> 
> 
>> On Wed, Aug 10, 2022 at 11:46 PM Sean Cole via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> Hi all,
>> I'm struggling with this still. It's been years (since before Dec 2020) and
>> I just can't get my head around it.
>> I have a template created in Dreamweaver that is a simple bit of HTML body
>> with CSS styling embedded (https://pidigital.co.uk/DeepDiveReport.html).
>> There is also a pdf that needs to be attached.
>> How do I use MimeEncodeAsMIMEMultipartDocument to make it ready to send via
>> tsNetSmtpSync?
>> There are zero tutorials and the dictionary is devoid of any useful
>> information on how to use it. Google turned up nothing. In my previous
>> request back in 2020, Monte, the author of the MIME library, had only
>> referred me on to the RSC docs for MIME which is like looking for a straw
>> in a needle stack. When I asked at one of the 'Firesides' I was told just
>> to use a template and send it. But to send it, it needs to be encoded and
>> that's the bit that is undocumented anywhere.
>> Any help appreciated.
>> ___
>> 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
> ___
> 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


___
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


Re: Previous request not completed

2021-10-12 Thread Charles Warwick via use-livecode
Hi Jacque,

You can use tsNet without libURL by using tsNet functions (tsNetGet, tsNetPost, 
...) rather than the libURL syntax (get URL, put URL, ...).

tsNet includes a libURL wrapper so that if you choose to use libURL commands 
and tsNet is included then libURL will perform the requests using tsNet instead 
of its own internal methods.  However, you are also free to not include libURL 
and just use tsNet by itself.

Whether you are using tsNet or libUrl, you can get the "previous request not 
completed" error if you are not using pro features and you are performing 
synchronous transfers.  The "non-pro" version of tsNet acts the same as libURL 
by only allowing one synchronous request at a time (the pro version of tsNet 
allows multiple synchronous requests at the same time).

In order to fix this, you can use tsNet's asynchronous commands (e.g.  tsNetGet 
instead of tsNetGetSync, tsNetPost instead of tsNetPostSync, ...) or libURL's 
"load URL" command.  The "load URL" command only support HTTP GET requests 
which means that if you need to use other types of requests (e.g. POST) then 
use the tsNet functions directly.

The tsNetLibUrlReuseConnection command is used to control whether or not your 
application will try to re-use an open connection to perform another request 
against the same server or whether it will open a completely new connection 
each time.  You will still experience the "previous request not completed" if 
you try to make two synchronous requests against the same server at the same 
time regardless of this setting.

Hope that helps,

Charles

> On 11 Oct 2021, at 4:02 am, J. Landman Gay via use-livecode 
>  wrote:
> 
> I'm sure it's coming from libURL. TSNet adds functionality to libURL and 
> they work together. As I understand it, you can't use TSNet alone, it needs 
> libURL.
> 
> https://www.mail-archive.com/use-livecode@lists.runrev.com/msg85062.html
> 
> Also:
> "So include libUrl and you get normal libUrl; include libUrl and tsNet and 
> you get libUrl driven by tsNet; include neither and you get the in-engine 
> implementation."
> https://www.mail-archive.com/use-livecode@lists.runrev.com/msg106501.html
> 
> Because TSNet allows me to set multiple connections, I wonder if that would 
> solve the problem. I'm too close to deadline to have time to tinker too much.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>> On October 9, 2021 10:34:05 PM Tom Glod via use-livecode 
>>  wrote:
>> Hhhmm Hi Jacquelinee,  which library are you using to send the
>> requests? Because that sounds like an error from liburl, and it describes
>> the limitation of the library. I could be wrong, but when using tsnet in
>> async mode, that error would not be triggered by the engine.
>> Hope that helps.
>> On Sat, Oct 9, 2021 at 3:58 PM J. Landman Gay via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> When sending several requests to a server, I get "Previous request not
>>> completed" a lot. If I
>>> set tsNetLibUrlReuseConnection to false, will that prevent it? Are there
>>> any down sides?
>>> --
>>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>>> HyperActive Software   | http://www.hyperactivesw.com
>>> ___
>>> 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
>> --
>> Tom Glod
>> Founder & Developer
>> MakeShyft R.D.A (www.makeshyft.com)
>> Mobile:647.562.9411
>> ___
>> 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
> 
> 
> 
> 
> ___
> 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


___
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


Re: "tsnet (1) Received HTTP/0.9 when not allowed"?

2021-03-31 Thread Charles Warwick via use-livecode
Hi Richard,

The curl version that is used in tsNet is regularly updated.  The latest 
version of tsNet is using curl 7.74.0.

My understanding of that particular issue is that if the first data line that 
is received back from the HTTP server doesn't match an appropriate response, it 
will assume HTTP/0.9.

Is there a test URL you can post that shows this problem so I can see what is 
coming back from the server?  Can you post what you are getting in the libURL 
debug?

Also, have you tried a version of LC that has a different version of tsNet 
included - just in case this happens to be a new bug in the curl library.

Thanks,

Charles

> On 1 Apr 2021, at 10:37 am, Richard Gaskin via use-livecode 
>  wrote:
> 
> Matthias wrote:
> 
>> was there a change in the configuration of your web server recently?
>> Is your web service using php or LC server?
> 
> LC Server.  Hosting likely had changes, since this app has been in production 
> for a long time without issue.
> 
> I believe the change most significant here is business success: Dreamhost 
> apparently has a lot of customers and runs pretty packed shared servers  
> these days (reason #48 why I prefer VPSes). I'm guessing part of this is a 
> noisy neighbor problem.
> 
> But I'd guess at least some of this is the interaction between Dreamhost's 
> resource quotas and LC's wasteful boot process, in which most of the 
> resources it consumes are for font init that I'd guess 99.9% of server 
> scripts never need:
> https://quality.livecode.com/show_bug.cgi?id=14115
> 
> Another contributing factor may be the curl version tsNet has embedded. Some 
> of the discussions I came across reference older curl versions that assume 
> HTTP 0.9 by default and misreport that under certain error conditions if 
> header info isn't parsed just so.
> 
> Is tsNet's curl version documented somewhere?
> Does LC keep tsNet updated with the latest curl with each release?
> 
> 
>> I am not sure if this is of help, but there is a debug stack
>> available for tsNET. Maybe the debug information gives you
>> some more information.
>> https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode
> 
> Thanks.  It's using libURLSetStatusCallback and libURLSetLogField, so it's 
> more or less like the one I'd already built into my tooling.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> 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


___
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


Re: tsNet mail message too slow!

2021-03-04 Thread Charles Warwick via use-livecode
Hi Rick,

What platform are you running LC server on?

There is an outstanding issue with tsNet running correctly in LC server on 
certain platforms.  The command executes quickly, but it doesn’t return control 
to the LC script for quite some time.

If this is what you are coming up against, I can have another look to see if 
there is something we can do about it.

Regards,

Charles 

> On 5 Mar 2021, at 11:49 am, Rick Harrison via use-livecode 
>  wrote:
> 
> Hi again,
> 
> From the time I click on the web-browser to
> activate the script to email the message
> until the web-browser arrives at the next
> webpage is one minute and 6 seconds.
> That is totally unacceptable.
> 
> I’m wondering if I can attempt to spin
> this off as if it were a thread or background
> task.
> 
> What comes to mind is having the
> email script be a stand-alone app
> that is called with a do as AppleScript
> from the web-browser.
> 
> Has anyone hadsuccess with
> this approach before?
> 
> Do you think this is worth a try or
> can you think of a better way?
> 
> Thanks,
> 
> Rick
> ___
> 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


___
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


Re: tsNet mail message not formatting

2021-03-03 Thread Charles Warwick via use-livecode
Hi Rick,

What code did you try to add the Bcc e-mail recipients?

The tRecipient variable to the tsNetSmtpSync command needs to be one e-mail 
address per line of all the recipients for the e-mail (To, Cc and Bcc) and that 
is what is used to determine who the e-mail is sent to.

The rest of that script (in the lesson) is about how to format the e-mail 
message, Bcc addresses don't get added to the header of the e-mail message.

So assuming your Bcc's addresses are stored in a variable called tBcc (one per 
line), then you need to simply adjust the script (from the lesson) as follows:

-- Make tRecipient a list of all recipients (To, Cc and Bcc)
put tTo & cr & tCc & cr & tBcc into tRecipient 

put tsNetSmtpSync(tUrl, tFrom, tRecipient, tEmailMessage, tResponseHeaders, 
tBytes, tSettings) into tResult

Regards,

Charles

> On 4 Mar 2021, at 9:20 am, Rick Harrison via use-livecode 
>  wrote:
> 
> Ok, everything is fine on the format front now.
> 
> I noticed the code takes about a minute to execute all the way through.
> (Must be a lot of background process have to run?)
> 
> I tried Charles Warwick’s suggestion for Bcc, and it didn’t work. :-(
> If any of you want to take a crack at it, please let me know your results.
> 
> Thanks to everyone!
> 
> Rick
> ___
> 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


___
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


Re: tsNet mail message not formatting

2021-03-03 Thread Charles Warwick via use-livecode
Hi Matthias,

I would not recommend sending e-mail this way.  It will create a new SMTP 
connection and send the e-mail message separately for every single recipient.

SMTP connections (and tsNetSMTP* commands) are designed to handle multiple 
recipients for one e-mail within a single SMTP transfer.

Regards,

Charles

> On 4 Mar 2021, at 9:30 am, matthias rebbe via use-livecode 
>  wrote:
> 
> Rick,
> 
> let's say
> 
> pTO contains one or more email recipients, each in one line
> pCC contains one or mor  cc recipients, each in one line
> pBCC contains one or more bcc recipients, each in one line
> tData contains the mime encoded message which includes all To and all CC 
> recipients
> 
> then you would do
> 
> 
> repeat for each line tLine in pTO
> put tsNetSmtpSync(tServer, tFrom, tLine, tData, rOutHeaders, rBytes, 
> tSettings)
> end repeat
> 
> repeat for each line tLine in pCC
> put tsNetSmtpSync(tServer, tFrom, tLine, tData, rOutHeaders, rBytes, 
> tSettings)
> end repeat
> 
> repeat for each line tLine in pBCC
> put tsNetSmtpSync(tServer, tFrom, tLine, tData, rOutHeaders, rBytes, 
> tSettings)
> end repeat
> 
> The last repeat sends to the BCC recipients.
> 
> 
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 03.03.2021 um 23:19 schrieb Rick Harrison via use-livecode 
>> :
>> Ok, everything is fine on the format front now.
>> I noticed the code takes about a minute to execute all the way through.
>> (Must be a lot of background process have to run?)
>> I tried Charles Warwick’s suggestion for Bcc, and it didn’t work. :-(
>> If any of you want to take a crack at it, please let me know your results.
>> Thanks to everyone!
>> Rick
>> ___
>> 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
> 
> 
> ___
> 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


___
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


Re: Version 1.2 of the mail stack

2021-03-02 Thread Charles Warwick via use-livecode
Hi Rick,

Assuming you are using the code from the lesson, just add any Bcc e-mail 
addresses to the tRecipient variable before the call to tsNetSmtpSync.

Since you don't include them in the variables passed to mimeEncodeAsMIMEEmail, 
the addresses won't be included in the e-mail headers.

Regards,

Charles

> On 3 Mar 2021, at 12:44 pm, Rick Harrison via use-livecode 
>  wrote:
> 
> Hi Matthias,
> 
> I got it to work!
> 
> I just needed the statement:
> 
> tsNetInit
> 
> Now it works great!
> 
> Is there anyway I can put in a  BCC email address instead of CC?
> 
> Thanks!
> 
> Rick
> 
>> On Mar 2, 2021, at 6:19 PM, matthias rebbe via use-livecode 
>>  wrote:
>> 
>> no, only the file which is suitable for the OS on which the Livecode Server 
>> is running.
>> For Windows it would be one of the .dll files, for Linux one of the .so 
>> files. The file with the 64 in its filename is for the 64bit version of the 
>> os, the other one for the 32bit verision.
>> 
>> So for macOS i would assume the tsNet.bundle. But there is also a 
>> tsNET.dylib file, which according to the suffix belongs also to macOS.
>> I am not sure. Maybe you should copy both of them.
>> 
>> But maybe someone could chime in about this.
>> 
>> 
>> 
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>> 
 Am 02.03.2021 um 23:54 schrieb Rick Harrison via use-livecode 
 :
>>> 
>>> Hi Matthias,
>>> 
>>> What I’m seeing is:
>>> 
>>> Applications
>>> LiveCode (App)
>>> (Right Click)Show Package Contents
>>> Contents
>>> Tools
>>> Ext
>>> tsNet_INDY_1.4.2 (Folder Full of tsNet stuff)
>>> 
>>> Do I want the entire folder?
>>> 
>>> Do I just want:
>>> 
>>> tsNet.bundle
>>> tsNet.dylib
>>> tsnetliburl.livecodescript
>>> 
>>> There’s a lot of items.
>>> 
>>> Thanks,
>>> 
>>> Rick
>>> 
 On Mar 2, 2021, at 5:23 PM, matthias rebbe via use-livecode 
  wrote:
 
 it seems tsNet is missing in your installation of Livecode Server.
 
 Please create a folder externals in the folder where livecode server is 
 installed.
 Then copy the tsNet external from you Livecode Desktop installation into 
 the newly created externals folder.
 
 That should do.
 
 Regards,
>>> 
>>> ___
>>> 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
>> 
>> 
>> ___
>> 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
> 
> 
> ___
> 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


___
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


Re: tsNet FTP help

2021-03-02 Thread Charles Warwick via use-livecode
Hi Scott,

This part of the server response is your clue:

> 421-Sorry, cleartext sessions and weak ciphers are not accepted on this 
> server.
> 421 Please reconnect using TLS security mechanisms.

You need to connect to the FTP server using SSL.  The following LC lesson 
should help:

https://lessons.livecode.com/m/4071/l/857714-how-to-use-tsnet-to-connect-to-an-ftp-server-over-ssl-ftps

Regards,

Charles

> On 3 Mar 2021, at 11:42 am, scott--- via use-livecode 
>  wrote:
> 
> Hello Folks (Matthias?),
> 
> I am trying to use tsNet to upload a file to my mHost account. Although the 
> lesson  
>  
>  seemed very straight forward, I am not making any headway.  I am using LC 
> 9.6.2 (rc 2) Business, OSX 11.2.1 Big Sur (MBP 2017). I've included the 
> pertinent portion of script and the server response below. Any suggestions 
> welcome.
> --
> Scott Morrow
> 
> Elementary Software
> (Now with 20% less chalk dust!)
> web   https://elementarysoftware.com/
> email sc...@elementarysoftware.com
> booth1-360-734-4701
> ———
> 
> My LiveCode script:
> 
> 
> tsNetInit -- NOT in lesson?
> 
> put "ftp://myUserName.serversignin.com; into tFtpServer --
> 
> put "/public_html" into tFtpDirectory
> 
> put "myUserName" into tSettings["username"]
> 
> put “myPassWord" into tSettings["password"]
> 
> set the itemDel to SLASH
> 
> put item -1 of tFilePath into tFileName
> 
> put URL("file:" & tFilePath) into tFileContents
> 
> put tsNetUploadSync(tFtpServer & tFtpDirectory & slash & tFileName, tHeaders, 
> tFileContents, tRecvHeaders, tResult, tBytes, tSettings) into tOutput
> 
> ——— Response from the server ——— 
> 
> 
> the result:  tsneterr: (28) Timeout was reached (this is returned almost 
> instantly)
> 
> 
> tRecvHeaders:
> 
> 220-- Welcome to Pure-FTPd [privsep] [TLS] --
> 
> 
> 
> 220-You are user number 3 of 188 allowed.
> 
> 
> 
> 220-Local time is now 00:15. Server port: 21.
> 
> 
> 
> 220-This is a private system - No anonymous login
> 
> 
> 
> 220-IPv6 connections are also welcome on this server.
> 
> 
> 
> 220 You will be disconnected after 30 minutes of inactivity.
> 
> 
> 
> 421-Sorry, cleartext sessions and weak ciphers are not accepted on this 
> server.
> 
> 
> 
> 421 Please reconnect using TLS security mechanisms.
> 
> 
> tsNetGetTimeouts() —>   60,0,30,6,0,0
> 
> 
> 
> 
> 
> 
> ___
> 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
___
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


Re: SSL Error - question from Stack Overflow

2021-02-18 Thread Charles Warwick via use-livecode
This seems to be an issue which has come up a few times over the years with 
the curl library.

It appears to be specific to when curl is compiled on OS X to use the Mac SSL 
library, rather than OpenSSL.

I am guessing you are trying this on a Mac?

I have tested a build of tsNet under OS X that uses OpenSSL instead, and the 
issue goes away.  Unfortunately, building tsNet to use OpenSSL on Mac would 
mean that it no longer uses the OS X certificate store for verifying SSL 
certificates.

Regards,

Charles

> On 17 Feb 2021, at 7:17 am, Richard Gaskin via use-livecode 
>  wrote:
> 
> Devin Asay wrote:
>> I came across this question on stack overflow. I like to try to give good 
>> LiveCode answers there when I can, just to do a little to boost the 
>> reputation of the LC community there. But I don’t have a clue on this one.
>> 
>> A Livecode script:
>> get URL 
>> "https://www.uspto.gov/patent/laws-and-regulations/patent-term-extension/patent-terms-extended-under-35-usc-156;
>> Winds up with the following in "the result":
>> tsneterr: (56) SSLRead() return error -9806
>> I tried setting libURLSetSSLVerification to both true and false, but got the 
>> same error each time. Any ideas why this is happening, and is there a 
>> solution?
>> 
> 
> As a cURL wrapper, tsNet's error messages tend to follow the same conventions 
> other cURL devs see, lending itself to generic searches:
> 
> https://duckduckgo.com/?q=SSLRead()+return+error+-9806=web
> 
> I only briefly looked at a few of the results, but it seems related to a very 
> specific SSL cert config that results in timeouts.  Beyond that you'll have 
> to read more, but hopefully that link will at least get you started until 
> Charles shows up with his usual thorough response.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> 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


___
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


Re: Which of the current FTP legends should I be using?

2021-01-30 Thread Charles Warwick via use-livecode
Hi,

If you are following the code from the lesson, what are you getting back in the 
tRecvHeaders variable?  Generally as part of the response stored in that 
variable, it will indicate whether it is using ascii or binary mode for 
transmission.

Regards,

Charles

> On 31 Jan 2021, at 11:21 am, PrestoBruce via use-livecode 
>  wrote:
> 
> I need to upload a binary file (jpg,pdf,png,etc) to an FTP account.
> I have spent more hours than I care to admit trying to make
> tsNetUploadSync work for me.
> 
> I used the example found at 
> https://lessons.livecode.com/m/4071/l/851756-how-to-upload-a-file-using-ftp
> Which at first blush, worked the first time (once I put in my server 
> path/login credentials etc).
> 
> However, binary files are corrupted. I see nothing in the tsettings array to 
> force binary xfer.
> 
> I get Transfer complete with server response code 226
> 
> 
> ___
> 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
> 
___
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


Re: LibURL and TSNet in LC Indy

2020-08-18 Thread Charles Warwick via use-livecode
Hi Tom,

Using unique URLs for multiple load URL requests against the same server with 
the standard libUrl library allows you to *initiate* multiple requests at once, 
but the requests will still only be sent to the server one at a time in the 
background.

tsNet will send the requests to the server in parallel, which can significantly 
decrease the time taken to perform the requests (assuming the server can cope 
with the load).

If you want to see what I mean, download the following stack:

https://downloads.techstrategies.com.au/tsNet/tsNet_libUrl_loadUrl.livecode

Open this up in LC Indy edition, and click the “Get Foreign Exchange Rates” 
button several times to get an average total time.

Then disable tsNet by running the following command in a message box:

dispatch “revunloadlibrary” to stack “tsnetliburl”

Then click the button several more times and compare the time difference.

Regards,

Charles


> On 19 Aug 2020, at 2:39 am, Tom Glod via use-livecode 
>  wrote:
> 
> Hi Charles,
> 
> Thanks for that tip, I suspect that will work to improve those failures on
> TSNET
> 
> My rest API is local ...written in Golang using the Fiber Library..
> which is very impressive performance wise, and super easy to implement.
> 
> An interesting side note... .liburl has this 'one at a time' limitation but
> its possible to get around it by having a unique enough URL. which my use
> case gives me automatically.
> 
> So as a result I can actually launch a lot of requests asynchronously.
> 
> I need to really test these components well.   so i will be posting
> some results. I just got it to work reliably yesterday.
> 
> Thanks again,
> 
> Tom
> 
> 
> 
>> On Mon, Aug 17, 2020 at 7:02 PM Charles Warwick via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>> Hi Tom,
>> 
>> If you want to stress test an API using the tsNet library, try adding a:
>> 
>> tsNetLibUrlReuseConnection false
>> 
>> Before issuing the loadUrl commands to see if that makes any difference.
>> 
>> Also note that with tsNet, multiple load URL commands can occur at the
>> same time against a single server, where as without tsNet, I think that
>> libUrl will wait for one to complete before sending the next one.
>> 
>> So it is also possible that you are hitting the remote server harder when
>> you are using tsNet than with the standard libUrl.
>> 
>> Regards,
>> 
>> Charles
>> 
>>> On 18 Aug 2020, at 8:23 am, Tom Glod via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Thank you sir. That worked.
>>> 
>>> I will try to diagnose the difference between the 2 libraries in this
>>> scenario.. if only to understand why its happening and not get burned
>>> elsewhere.
>>> 
>>> Thanks.
>>> 
>>> Tom
>>> 
>>> 
>>> 
>>> On Mon, Aug 17, 2020 at 4:41 PM Ralph DiMola via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> Tom,
>>>> 
>>>> Your problem with tsNet could be a timeouts. See tsNetSetTimeouts
>>>> 
>>>> Disable tsNet:
>>>> dispatch "revunloadlibrary" to stack tsnetliburl
>>>> 
>>>> Enable tsNet:
>>>> dispatch "revloadlibrary" to stack tsnetliburl
>>>> 
>>>> Ralph DiMola
>>>> IT Director
>>>> Evergreen Information Services
>>>> rdim...@evergreeninfo.net
>>>> 
>>>> 
>>>> -Original Message-
>>>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
>>>> Behalf
>>>> Of Tom Glod via use-livecode
>>>> Sent: Monday, August 17, 2020 4:32 PM
>>>> To: How to use LiveCode
>>>> Cc: Tom Glod
>>>> Subject: LibURL and TSNet in LC Indy
>>>> 
>>>> Hi Folks,
>>>> 
>>>> I am  stress testing a rest api using liburl, I will also do TSNET
>>>> 
>>>> But when I open my stack in Livecode Indy, the load URL command uses
>> TSNET
>>>> 
>>>> Whats funny is that half the requests are failing when it tries to use
>>>> TSNET. With liburl, 100% success rate using LC Community.
>>>> 
>>>> I am also calling a custom liburlcallback handler.
>>>> 
>>>> Is there any way to prevent indy from using TSNET by default?
>>>> 
>>>> Thanks
>>>> 
>>>> Tom
>>>> _

Re: LibURL and TSNet in LC Indy

2020-08-17 Thread Charles Warwick via use-livecode
Hi Tom,

If you want to stress test an API using the tsNet library, try adding a:

tsNetLibUrlReuseConnection false

Before issuing the loadUrl commands to see if that makes any difference.

Also note that with tsNet, multiple load URL commands can occur at the same 
time against a single server, where as without tsNet, I think that  libUrl will 
wait for one to complete before sending the next one.

So it is also possible that you are hitting the remote server harder when you 
are using tsNet than with the standard libUrl.

Regards,

Charles

> On 18 Aug 2020, at 8:23 am, Tom Glod via use-livecode 
>  wrote:
> 
> Thank you sir. That worked.
> 
> I will try to diagnose the difference between the 2 libraries in this
> scenario.. if only to understand why its happening and not get burned
> elsewhere.
> 
> Thanks.
> 
> Tom
> 
> 
> 
> On Mon, Aug 17, 2020 at 4:41 PM Ralph DiMola via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Tom,
>> 
>> Your problem with tsNet could be a timeouts. See tsNetSetTimeouts
>> 
>> Disable tsNet:
>> dispatch "revunloadlibrary" to stack tsnetliburl
>> 
>> Enable tsNet:
>> dispatch "revloadlibrary" to stack tsnetliburl
>> 
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> rdim...@evergreeninfo.net
>> 
>> 
>> -Original Message-
>> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On
>> Behalf
>> Of Tom Glod via use-livecode
>> Sent: Monday, August 17, 2020 4:32 PM
>> To: How to use LiveCode
>> Cc: Tom Glod
>> Subject: LibURL and TSNet in LC Indy
>> 
>> Hi Folks,
>> 
>> I am  stress testing a rest api using liburl, I will also do TSNET
>> 
>> But when I open my stack in Livecode Indy, the load URL command uses TSNET
>> 
>> Whats funny is that half the requests are failing when it tries to use
>> TSNET. With liburl, 100% success rate using LC Community.
>> 
>> I am also calling a custom liburlcallback handler.
>> 
>> Is there any way to prevent indy from using TSNET by default?
>> 
>> Thanks
>> 
>> Tom
>> ___
>> 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
>> 
>> 
>> ___
>> 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
>> 
> 
> 
> -- 
> Tom Glod
> Founder & Developer
> MakeShyft R.D.A (www.makeshyft.com)
> Mobile:647.562.9411
> ___
> 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
> 


___
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


Re: tsnetGetFile() example using HTTP?

2020-07-18 Thread Charles Warwick via use-livecode
Hi Phil,

You can use the same command with HTTP, just make sure you set any HTTP headers 
accordingly (similar to tsNetGet).

As for the issues with FTP, which version of LC are you using?

Regards,

Charles 

> On 18 Jul 2020, at 6:48 pm, Phil Davis via use-livecode 
>  wrote:
> 
> Hi Charles,
> 
> Thanks for the response. Yes, my app is doing what is shown in the lesson 
> (using FTP) and it's generally successful as long as the files aren't too 
> large. Are you saying I can probably just change the protocol to HTTP and it 
> will likely work? I'll try it when I'm not so bleary-eyed (it's almost 2 AM 
> here in the US Pacific Northwest).
> 
> Phil
> 
> 
>> On 7/18/20 12:54 AM, Charles Warwick via use-livecode wrote:
>> Hi Phil,
>> 
>> Does this lesson help you?
>> 
>> http://lessons.livecode.com/m/4071/l/853715-how-to-asynchronously-download-via-sftp-directly-to-a-file
>> 
>> It uses SFTP with tsNetGetFile, so while the protocol used is different, the 
>> concept is the same.
>> 
>> Regards,
>> 
>> Charles
>> 
>>> On 18 Jul 2020, at 5:17 pm, Phil Davis via use-livecode 
>>>  wrote:
>>> 
>>> Does anyone have an working example stack you're willing to share where 
>>> 'tsnetGetFile' or 'tsnetGetFileSync' is using HTTP (or HTTPS) to download a 
>>> file? I have had limited success using FTP but it consistently fails (in my 
>>> situation at least) when files are bigger than 200-300 MB (depending I 
>>> guess on network traffic at that moment, or ???).
>>> 
>>> Today I started with the example described in the lesson:
>>> http://lessons.livecode.com/m/4071/l/945907-how-to-download-multiple-files-in-the-background-with-tsnet
>>> 
>>> The example uses HTTP via 'tsnetGet' to download the text of web pages into 
>>> a variable, and then uses "put tData into url ("file:" )" to make the 
>>> files. In my real-world situation I can't do that. My actual downloads are 
>>> binary files that can be over 1 GB. I need to download them as files to the 
>>> local disk, so for me 'tsnetGet' is out.
>>> 
>>> There are no tsnet examples on http://livecodeshare.runrev.com/ so I'm 
>>> turning to you (which I should have done earlier).
>>> 
>>> (Is there anywhere else I should look for examples? I did look on 
>>> stackexchange and stackoverflow but no joy.)
>>> 
>>> Thanks for any and all responses.
>>> 
>>> -- 
>>> Phil Davis
>>> 503-307-4363
>>> 
>>> 
>>> ___
>>> 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
>>> 
>> ___
>> 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
>> 
> 
> -- 
> Phil Davis
> 503-307-4363
> 
> 
> ___
> 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
> 


___
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


Re: tsnetGetFile() example using HTTP?

2020-07-18 Thread Charles Warwick via use-livecode
Hi Phil,

Does this lesson help you?

http://lessons.livecode.com/m/4071/l/853715-how-to-asynchronously-download-via-sftp-directly-to-a-file

It uses SFTP with tsNetGetFile, so while the protocol used is different, the 
concept is the same.

Regards,

Charles 

> On 18 Jul 2020, at 5:17 pm, Phil Davis via use-livecode 
>  wrote:
> 
> Does anyone have an working example stack you're willing to share where 
> 'tsnetGetFile' or 'tsnetGetFileSync' is using HTTP (or HTTPS) to download a 
> file? I have had limited success using FTP but it consistently fails (in my 
> situation at least) when files are bigger than 200-300 MB (depending I guess 
> on network traffic at that moment, or ???).
> 
> Today I started with the example described in the lesson:
> http://lessons.livecode.com/m/4071/l/945907-how-to-download-multiple-files-in-the-background-with-tsnet
> 
> The example uses HTTP via 'tsnetGet' to download the text of web pages into a 
> variable, and then uses "put tData into url ("file:" )" to make the 
> files. In my real-world situation I can't do that. My actual downloads are 
> binary files that can be over 1 GB. I need to download them as files to the 
> local disk, so for me 'tsnetGet' is out.
> 
> There are no tsnet examples on http://livecodeshare.runrev.com/ so I'm 
> turning to you (which I should have done earlier).
> 
> (Is there anywhere else I should look for examples? I did look on 
> stackexchange and stackoverflow but no joy.)
> 
> Thanks for any and all responses.
> 
> -- 
> Phil Davis
> 503-307-4363
> 
> 
> ___
> 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
> 
___
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


Re: IMAP Search skipping results

2020-03-23 Thread Charles Warwick via use-livecode
Hi Sean,

For your particular issue, does using “SEARCH UNSEEN” instead of “UID SEARCH 
NOT SEEN” provide the results you are looking for?

Regards,

Charles

> On 21 Mar 2020, at 3:10 am, Pi Digital via use-livecode 
>  wrote:
> 
> Thanks Bob
> 
> Yeah, I actually already have something like that. I’d abbreviated my code to 
> keep it simple on the forum. I’m not having trouble connecting. It’s just the 
> shortage of data returned from the server. It’s actually skipping a whole 
> chunk in the middle which is the weirdest part. 
> 
> There is this bug which is yet to be followed up on. 
> 
> https://quality.livecode.com/show_bug.cgi?id=22216
> 
> So I look forward to that in a couple of years maybe. 
> 
> In the meantime I’m hoping I find a solution to this or else it’s yet another 
> reason for clients to disappear saying “you can’t even do so and so”. It gets 
> so tedious having all the workarounds on workarounds. 
> 
> Sean Cole
> Pi Digital
> 
>> On 20 Mar 2020, at 15:10, Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> This version wraps ALL the tsNet calls in a try catch construct:
>> 
>> function IMAPGetHeaders pServer, pUser, pPass
>>  if pServer is empty then
>> ask "Enter IMAP Server IP or address:" as sheet
>> if the result is "Cancel" then return "Canceled."
>> put it into pServer
>>  end if
>> 
>>  if pUser is empty then
>> ask "Enter email address:" as sheet
>> if the result is "Cancel" then return "Canceled."
>> put it into pUser
>>  end if
>> 
>>  if pPass is empty then
>> ask password "Enter password:" as sheet
>> if the result is "Cancel" then return "Canceled."
>> put it into pPass
>>  end if
>> 
>>  put pUser into tSettings["username"]
>>  put pPass into tSettings["password"]
>>  put empty into xHeaders
>> 
>>  try
>> tsnetinit
>> put tsNetCustomSync(pServer, \
>>   "SELECT INBOX",xHeaders,retHeaders,retResult, \
>>   retBytes,tSettings) into tStat
>> put tsNetCustomSync(pServer, \
>>   "UID SEARCH NOT SEEN",xHeaders,retHeaders, \
>>   retResult,retBytes,tSettings) into tStat
>>  catch tError
>> answer error "ERROR: " & tError as sheet
>> breakpoint
>>  end try
>> 
>>  put word 3 to -1 of tStat into tUIDs
>>  put the number of words in tUIDs into sMsgCount
>>  return retHeaders & tStat & sMsgCount
>> end IMAPGetHeaders
>> 
>>> On Mar 20, 2020, at 08:06 , Bob Sneidar via use-livecode 
>>>  wrote:
>>> 
>>> This may be of more use. No functional changes, just something you can use 
>>> to test against different IMAP servers:
>> 
>> 
>> ___
>> 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
> ___
> 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


___
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


Re: SSH and SCP in LiveCode

2019-11-01 Thread Charles Warwick via use-livecode
Hi Mike,

tsNet does support file transfers via SSH, just use sftp:// at the start of the 
URL instead of ftp:// or ftps://, otherwise the commands are mostly identical.

Just note that not all SSH features are supported in the Indy version of LC - 
some require the Business edition.

What are you trying to do that you think tsNet doesn’t support?

Regards,

Charles

> On 2 Nov 2019, at 3:21 am, Mike Felker via use-livecode 
>  wrote:
> 
> Hello group.
> 
> 
> 
> Just joined but long-time LiveCode user.
> 
> 
> 
> I need SSH / SCP capability for LiveCode.
> 
> 
> 
> Anyone know how to use this (either the old external or by any other means)?
> 
> 
> 
> I do not thing TSNet will help in this case.
> 
> 
> 
> Thanks.
> 
> 
> 
> Mike
> 
> 
> 
> 
> Rubidex - The Reliable Blockchain Company
> 
> Mike Felker
> 
> CTO Rubidex
> 
> 813-810-3457
> 
> 138 Whitaker Road, Suite A
> 
> Lutz, FL 33549
> 
> rubidex.net
> ___
> 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
> 


___
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


Re: DELETE url

2019-07-05 Thread Charles Warwick via use-livecode
Hi,

You can send a HTTP DELETE using tsNet.  There is a lesson here that shows you 
how:

http://lessons.livecode.com/m/4071/l/856543-how-to-send-a-custom-http-request-using-the-tsnet-external

All tsNet functions work on mobile, so no issue there either.

Regards,

Charles

> On 6 Jul 2019, at 8:27 am, Stephen MacLean via use-livecode 
>  wrote:
> 
> Hi J,
> 
> DELETE does work, it’s used in the WP library. 
> 
> I’m out right now, but will find the code and send you a sample when I get 
> back. 
> 
> Best,
> Steve MacLean
> 
>> On Jul 5, 2019, at 6:23 PM, J. Landman Gay via use-livecode 
>>  wrote:
>> 
>> The server lady wants it that way. I create signed AWS URLs that are secure 
>> and which access her APIs. So far we've only used POST, PUT, and GET. Now 
>> we've added a "log out" function and I'm supposed to send the URL with 
>> DELETE. She is floored that I can't do that:
>> 
>> "I can change it if you really don’t have DELETE, but I would find it 
>> surprising. If you do have it, I’d prefer to keep it as DELETE since it 
>> makes the most sense for the action."
>> 
>> Then she suggests using cURL but that won't work on mobile where we can't 
>> use shell.
>> 
>> I wouldn't know where to start with tsNetCustom(), but I'll investigate. 
>> Suggestions welcome, provided it works on mobile.
>> 
>>> On 7/5/19 3:30 PM, Dar Scott Consulting via use-livecode wrote:
>>> Testing DELETE is scary. Consider httpstat.us , 
>>> httpbin.org  or others for safe testing.
>>> I haven't tested, but I'd think that 'delete URL 
>>> "http://www.example.com/oldthings.txt 
>>> "' should work.
>>> You might need to pass along some auth:
>>> delete URL "http://badwolf:swordf...@www.example.com/secretthings.txt 
>>> "
>>> If not, you can directly use TCP. It is as easy as a simple GET. It is as 
>>> hard as figuring out simple HTTP.
>>> Or consider tsNetCustom() and use "DELETE" as the request.
>>> Dar Scott
>>> darzLab
 On Jul 5, 2019, at 1:55 PM, J. Landman Gay via use-livecode 
  wrote:
 
 I need to send a DELETE to a server. I only know of PUT, GET, and POST 
 options. Does tsNet support DELETE? If not, how would I do that?
 
 -- 
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.com
>> 
>> 
>> -- 
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>> 
>> 
>> ___
>> 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
> 
> 
> 
> ___
> 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
___
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

Re: IMAP library, or support via tsNet?

2019-01-03 Thread Charles Warwick via use-livecode
Hi Ben,

Support for IMAP was added into tsNet a while ago. There are a few lessons that 
I’ve added to LiveCode’s website on IMAP.

Lessons:

http://lessons.livecode.com/m/4071/l/858279-how-to-use-tsnet-to-display-an-e-mail-message-from-an-imap-account

http://lessons.livecode.com/m/4071/l/858974-how-to-use-tsnet-to-display-the-folders-stored-in-an-imap-account

http://lessons.livecode.com/m/4071/l/860779-how-to-use-tsnet-to-delete-an-e-mail-message-from-an-imap-account

Regards,

Charles.

> On 4 Jan 2019, at 5:56 am, Ben Rubinstein via use-livecode 
>  wrote:
> 
> Aha! I didn't even realise that there was an imap URL protocol.
> 
> Thanks Matthias, that's exactly what I needed.
> 
> best regards,
> 
> Ben
> 
>> On 03/01/2019 13:57, Matthias Rebbe via use-livecode wrote:
>> Ben,
>> i just did a quick test with my local test mai server. This script for 
>> example would output the number of messages in the imap folder to the 
>> message box.
>> put tUSERNAME into pSettings["username"]
>> put put into pSettings["password"]
>> put "STATUS INBOX (MESSAGES)" into pRequest
>> put "imap://192.168.7.25" into pURL
>> put 
>> tsnetCustomSync(pURL,pRequest,xHeaders,rOutHeaders,rResult,rBytes,pSettings)
>> Did not try ssl, but should work also.
>> Regards,
>> Matthias
>> Matthias Rebbe
>> free tools for Livecoders:
>> https://instamaker.dermattes.de
>> https://winsignhelper.dermattes.de
>>> Am 03.01.2019 um 12:17 schrieb Ben Rubinstein via use-livecode 
>>> :
>>> 
>>> Is there anything in the way of an IMAP library around?
>>> 
>>> My needs are relatively simple: I want to connect to an iMAP server, 
>>> recursively list folders and fetch the size of each (if necessary by 
>>> fetching the size of each message)
>>> 
>>> e.g. in JavaScript with this library
>>>https://github.com/emailjs/emailjs-imap-client
>>> I'd be using
>>>connect()
>>>listMailboxes()
>>>    listMessages(... ['RFC822.SIZE'])
>>>...
>>> 
>>> Is there a library that would support this kind of access?
>>> 
>>> Does tsNet provide anything above the basic network primitives to support 
>>> this?  Some time I ago there was a tantalising hint on this list:
>>> 
>>>> On 24/08/2017 11:05, Charles Warwick via use-livecode wrote:
>>>> IMAP and POP3 support in tsNet under Linux is only available in tsNet 
>>>> 1.3.0+ which will be bundled with the next LC release.
>>>> All other platforms have had support for those protocols for a while.  I 
>>>> hope to have some documentation available in the next two weeks.
>>> 
>>> Did that ever come to fruition?
>>> 
>>> 
>>> Many thanks,
>>> 
>>> Ben
>>> 
>>> ___
>>> 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
>> ___
>> 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
> 
> ___
> 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
> 
___
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

Re: Websockets Problem on LiveCode

2018-12-26 Thread Charles Warwick via use-livecode
Hi Todd,

Did you try the sample LC stack that I sent you with the socket external?  It 
allows you to send basic websocket messages to a server.  If you did try it, 
what happened?

The beta version should work on Windows, Mac and iOS (Android version is easy 
to add if needed).

Regards,

Charles

> On 27 Dec 2018, at 3:47 pm, Todd Fabacher via use-livecode 
>  wrote:
> 
> This is a 911 call for HELP from anyone.
> 
> We are using a Socket IO server. We tried using the web browser to
> send websockets messages...no problems.
> 
> but when we listen and receive the websocket message, that is where the
> problem is created. If we don't call LiveCode from the web browser, we
> don't have any issues.
> 
> But as soon as the browser calls a LiveCode function from Javascript the
> app is crashing in both iOS and Android. Sometime after 10 mins, sometimes
> after 20 mins - but it never makes it over an hour.
> 
> I assume that it is a memory leaking error. Has anyone had this problem of
> calling LiveCode function from a JavaScript function in the browser?? This
> is a HUGE problem for us as the app cannot be shipped.
> 
> Charles, you said you had a solution, but we could not get it to work.
> Maybe we were doing something wrong and you could point us in the right
> direction.
> 
> Thanks for any help,
> 
> Todd
> ___
> 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
> 


___
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


Re: LiveCode and Websockets

2018-11-25 Thread Charles Warwick via use-livecode
Hi Bob,

The external is still in development, so I have not yet uploaded any 
information or documentation to the web.  I am happy to send you the latest 
beta version along with a few sample scripts if you are interested, just send 
me an e-mail directly.

Regards,

Charles

> On 25 Nov 2018, at 12:44 am, "b...@bobhall.net"  wrote:
> 
> Charles,
> 
> I would like to find out more about your socket external specifically for 
> websockets. Can you point me to where I can find out about the socket 
> external?
> 
> Thanks,
> Bob Hall
> 
>> On Nov 23, 2018, at 1:10 AM, Charles Warwick via use-livecode 
>>  wrote:
>> 
>> Hi Todd,
>> 
>> Depending on what platforms you need to support, I have a socket external 
>> for LiveCode that includes the ability to use websockets.
>> 
>> Cheers,
>> 
>> Charles
> 
___
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


Re: LiveCode and Websockets

2018-11-22 Thread Charles Warwick via use-livecode
Hi Todd,

Depending on what platforms you need to support, I have a socket external for 
LiveCode that includes the ability to use websockets.

Cheers,

Charles

> On 23 Nov 2018, at 4:09 pm, Todd Fabacher via use-livecode 
>  wrote:
> 
> We have hot a wall because we have an API that is ONLY accessible via a
> call to Socket.io server using Websockets.
> 
> Richard Gaskin, I remember you were looking into this last year, any
> success from your research.
> 
> It seems the best way would be to open a web browser and code the
> communications using Javascript, which would then all a LiveCode function
> on the callback.
> 
> Any suggestions would be appreciated!!
> 
> Much Thanks,
> 
> --Todd
> ___
> 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
> 


___
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


Re: Example of Livecode function settings array syntax?

2018-07-24 Thread Charles Warwick via use-livecode
Hi Keith,

If you take a look at the following LC lesson for uploading a file via FTP with 
tsNet, it shows how to add a username and password to the settings parameter of 
a tsNet function (which in the example is the tsNetUploadSync command).

http://lessons.livecode.com/m/4071/l/851756-how-to-upload-a-file-using-FTP

The same method works for all tsNet functions that accept a settings parameter.

Please let me know if that answers your question,

Regards,

Charles

> On 24 Jul 2018, at 6:15 pm, Keith Clarke via use-livecode 
>  wrote:
> 
> Hi folks,
> I’m trying to add username & password to the pSettings parameter in the 
> tsNetPost function but have no clue on the correct syntax for settings 
> parameter arrays.
> 
> Unfortunately, the documentation is not helpful in this regard for the 
> infrequent user - no brief syntax description, code examples or 
> cross-references.
> 
> I’d be obliged if anyone could please point me at a dictionary entry 
> containing a worked example or lesson showing correct function settings array 
> syntax?
> Thanks & regards,
> Keith
> 
> 
> 
> 
> 
> ___
> 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


___
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

Re: Mastering TS Net

2018-07-01 Thread Charles Warwick via use-livecode
Hi BR,

There are a series of lessons on tsNet on the LiveCode website:

http://lessons.livecode.com/m/4071/c/235433

If you are looking for an example of how to download something direct to a 
file, the lesson called “How to asynchronously download via SFTP directly a 
file” should help.

The same concepts apply for downloading to a file regardless of the protocol 
being used.

If you can’t quite find an example lesson that answers what you need, let me 
know and I will get one organised.

Regards,

Charles

> On 2 Jul 2018, at 1:19 am, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> I really need to get my head around TSNet, so began experiments.
> 
> This is the documentation for tsNetGetFile
> 
> " local tHeaders, tResult
> 
> put tsNetGetFile("1", "/path/to/downloaded/file.dat", \
> "ftp://user:p...@ftp.example.com/file.dat;, tHeaders, \
> "transferComplete") into tResult
> 
> on transferComplete pID, pResult, pBytes, pCurlCode
>local tData, tHeaders
>if pCurlCode is not 0 then
>answer tsNetRetrError(pID)
>else
>answer "File has been downloaded"
>end if
>tsNetCloseConn pID
> end transferComplete
> 
> # but my first attempt to "get it" ... ran into this error. 
> 
> Are there any good lessons on all TSNet functions?
> I am not looking forward to wading into this blind as a bat.
> 
> # variable watcher
> 
> tResult  --tsneterr: ID already in use
> 
> what is strange is this, the IDE gives the error even before tracing the 
> mouseup.
> 
> So I did not even get off home plate.
> 
> 
> local tHeaders, tResult
> 
> on mouseup 
> # put a break here... the IDE show an error *before* stepping into the next 
> statement
> # I can't even close the connection with:
>   tsNetCloseConn "1"
>   put empty into tResult
>   put fld aURL into pURL
>   put empty into fld "fldHTTPHeader"
>   put empty  into fld "tHTMLfield"
>   set the itemDel to "/" 
>   put item -1 of pURL into tFileName
>   put ("~/Desktop/") into tLocalFile
>   put tsNetGetFile("1",tLocalFile,pURL,tHeaders,"transferComplete") into 
> tResult
> 
>   --  put libURLLastHTTPHeaders() into fld "fldHTTPHeader" 
> end mouseup
> 
> on transferComplete pID, pResult, pBytes, pCurlCode
>   if pCurlCode is not 0 then
>  answer tsNetRetrError(pID)
>   else
>  answer "File has been downloaded"
>  put tHeaders into fld "fldHTTPHeader"
>   end if
>   tsNetCloseConn pID
> end transferComplete
> 
> BR
> 
> 
> ___
> 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
> 


___
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

Re: tsNet issues

2018-06-28 Thread Charles Warwick via use-livecode
Hi Richard,

What version of LC are you using?

If I run the following code in LC 9.0.0, I get an answer dialog indicating a 
404 error was returned:

on mouseUp
   get URL “https://downloads.techstrategies.com.au/blah”
   if the result is not empty then
  answer the result
   end if
end mouseUp

Cheers,

Charles

> On 29 Jun 2018, at 5:29 am, Richard Gaskin via use-livecode 
>  wrote:
> 
> 1. When attempting to get a URL that should return 404, "the result" is 
> empty.  Is this a known issue, or should I file a new report?
> 
> 2. I don't need tsNet for what I'm working on at the moment - how do I turn 
> it off?
> 
> This older recommendation no longer seems to do the trick:
> 
>   dispatch "revUnloadLibrary" to stack "tsNetLibURL"
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> 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
> 


___
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

Re: What exactly does the status pending in Livecode Quality Control Center mean

2018-06-27 Thread Charles Warwick via use-livecode
Hi Matthias,

> On 27 Jun 2018, at 7:57 am, Matthias Rebbe via use-livecode 
>  wrote:
> 
> Hm, On-Rev support told me that  GLIBC 2.1.4 is needed to run Livecode Server 
> 9 64bit on On-Rev. The 32bit version is working on On-Rev with the older one.
> They did not mention that this library is also needed to get the 32bit tsNET 
> external  running with Livecode server 32 bit on On-Rev.

Usually I run Apache (with PHP/LiveCode) in docker these days.  I am not sure 
if you are familiar with it, but here is the contents of the Dockerfile which 
builds the image.  It is effectively just a script that builds a basic Ubuntu 
16:04 Linux server running Apache.

( I can successfully use the latest tsNet external with it.)

—

FROM ubuntu:16.04

EXPOSE 80

RUN apt-get update && \
apt-get install -y \
apache2 \
libc6-i386 \
libfontconfig \
libx11-6 \
libxext6 \
unzip \
wget

COPY apache2/apache2.conf /etc/apache2/apache2.conf
COPY livecode/LiveCodeIndyServer-9_0_0-Linux-x86_64.zip 
/LiveCodeIndyServer-9_0_0-Linux-x86_64.zip

RUN mkdir -p /usr/local/livecode && cd /usr/local/livecode && \
unzip /LiveCodeIndyServer-9_0_0-Linux-x86_64.zip && \
chmod 755 livecode-server && \
a2enmod actions && a2enmod cgi

COPY livecode/tsNet-x64.so /usr/local/livecode/externals/tsNet-x64.so

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_RUN_DIR=/var/run/apache2

ENTRYPOINT ["/usr/sbin/apache2"]
CMD ["-D", "FOREGROUND"]

—

The apache2.conf file that gets copied in simply sets up the livecode-server 
binary to handle .lc files - which I am guessing you are already familiar with.

Hope that helps,

Cheers,

Charles



> Regards,
> 
> Matthias
>> 
>>> On 25. Jun 2018, at 22:01, panagiotis merakos via use-livecode 
>>>  wrote:
>>> 
>>> I have it working with LC Server 9 on an Ubuntu 16.04 64bit but only tested
>>> on localhost. But if I remember correctly there are a couple of people
>>> using tsnet with LC server on an actual server (Ralf maybe??)
>> 
>> 
>> ___
>> 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
> 
> 
> ___
> 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
___
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

Re: What exactly does the status pending in Livecode Quality Control Center mean

2018-06-27 Thread Charles Warwick via use-livecode
Hi Ralf,

> In a nutshell following the results of my tests:
> 
> - There is bug 18961. An issue regarding tsNetSendCmd() is presumably 
> related. Other Indy features work as expected.

The issue is that any asynchronous tsNet function will fail on LC server.  I 
have not yet had time to go back and resolve the cause of this problem.

> - Although the business version licensing error is fixed the business 
> features still don’t work.
>  (As soon as I have enough spare time I will start filing bug reports, one by 
> one.)

Are you referring to asynchronous functions that are only available in the 
business edition?  These will fail due to the same issue as tsNetGet and 
tsNetSendCmd, so no need to file a separate bug report for these.

If you are experiencing issues with other business only features, please file a 
report so that I can take a look at them.

> - On On-Rev using LC server 9 tsNet does not work at all because glibc needs 
> to be upgraded as I was told by support.
>  Custom directives in ~/.bashrc didn’t help, these seem to be ignored by 
> Apache.
> 
> - Don’t think about using tsNet in a LC server / Mac OS environment.

Unfortunately, I need to find some time to look into the LC server 
implementation on platforms other than Linux before they will be viable for use 
with tsNet.

Regards,

Charles

> 
> Ralf
> 
> 
>> On 25. Jun 2018, at 22:01, panagiotis merakos via use-livecode 
>>  wrote:
>> 
>> I have it working with LC Server 9 on an Ubuntu 16.04 64bit but only tested
>> on localhost. But if I remember correctly there are a couple of people
>> using tsnet with LC server on an actual server (Ralf maybe??)
> 
> 
> ___
> 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


___
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

Re: Is anyone using tsNet external with LCserver?

2018-05-29 Thread Charles Warwick via use-livecode
Hi Mark,

My apologies, I meant only one commercial edition of LC server.  You download 
it from livecode.com after logging in to your account.

Cheers,

Charles

> On 29 May 2018, at 6:41 pm, Mark Wieder via use-livecode 
>  wrote:
> 
>> On 05/29/2018 01:22 AM, Charles Warwick via use-livecode wrote:
>> Hi Matthias,
>> Up until 8.1.10, there was only one version of LC server.  It reports itself 
>> to the tsNet external as the “Indy” edition.  If you use the business 
>> edition of tsNet with it, it will fail.
> 
> Actually the editionType reports "community".
> 
> Interestingly, only the Community edition can be downloaded from the 
> downloads page. The other versions all throw 404s.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> ___
> 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


___
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

Re: Is anyone using tsNet external with LCserver?

2018-05-29 Thread Charles Warwick via use-livecode
Hi Matthias,

Up until 8.1.10, there was only one version of LC server.  It reports itself to 
the tsNet external as the “Indy” edition.  If you use the business edition of 
tsNet with it, it will fail.

You can use ‘the editionType’ to determine if LC server is Indy (commercial) or 
Business (professional).

Regards,

Charles

> On 29 May 2018, at 6:09 pm, Matthias Rebbe via use-livecode 
>  wrote:
> 
> I am not sure. But would that make a difference? There is only one type of 
> Livecode Server commercial. And according to Panos´ post to this thread the 
> tsNet Business external should work since release 8.1.10.
> 
> I´ve tried myself and made a custom installation on my web server. I 
> installed LC Server 8.1.10 commercial to the cgi-bin and copied the 
> tsNet-x64.so (from the Livecode Business installation on my Mac) to the 
> externals folder on the web server..
> It´s the same. Should i try Indy instead?
> 
> Btw. Is there a LC command/function which returns what type of Livecode 
> server (community or commercial) is running?
> 
> Regards,
> 
> Matthias
> 
> 
>> Am 29.05.2018 um 09:57 schrieb Charles Warwick via use-livecode 
>> :
>> 
>> Hi Matthias,
>> 
>> Just to check - did they install the Indy version of the tsNet external?
>> 
>> Regards,
>> 
>> Charles
>> 
>>> On 29 May 2018, at 5:37 am, Matthias Rebbe via use-livecode 
>>>  wrote:
>>> 
>>> Hi Charles,
>>> 
>>> thanks. Unfortunately it does not work. I have a Hosting account at 
>>> HostM.com <http://hostm.com/>. They installed a Livecode server commercial 
>>> version for me  for all of my accounts months ago, so i do not have to 
>>> install it for every addon domain folder.
>>> Today they installed the tsNet External into the Externals folder for me. 
>>> But it was not working.
>>> I get this error message:
>>> file "/home/ua82/public_html/domain1/index.lc"
>>> row 2, col 1: Handler: can't find handler (tsNetinit)
>>> This is what they replied to support request.
>>> "It looks like you may have to contact the developer of tsNet so they can 
>>> look into this and run some tests on their end.
>>> The issue is complicated by the fact that the following commands do not 
>>> currently seem to work properly on LiveCode Server (9.0.0) in order to 
>>> verify which externals and their functions etc. have been loaded:
>>> put the externals of stack “Home"
>>> put the externalCommands of stack “Home"
>>> put the externalFunctions of stack “Home"
>>> put the externalPackages of stack “Home”
>>> With all of the above command always returning empty, there becomes more 
>>> difficult to determine if the issue that you’re experiencing is caused by 
>>> tsNet not wanting to load to begin with, or by a bug in tsNet itself, but 
>>> the developer should be able to look into this.”
>>> 
>>> Any idea what might cause this.
>>> 
>>> Regards,
>>> 
>>> Matthias
>>> 
>>> 
>>>> Am 28.05.2018 um 05:49 schrieb Charles Warwick via use-livecode 
>>>> :
>>>> 
>>>> Hi Matthias,
>>>> 
>>>> You should just need to copy the relevant tsNet external (for Linux x64 it 
>>>> is tsNet-x64.so) into the external directory from your normal commercial 
>>>> desktop installation.
>>>> 
>>>> After that, just make sure you call tsNetInit before making any other 
>>>> tsNet calls.
>>>> 
>>>> Regards,
>>>> 
>>>> Charles
>>>> 
>>>>> On 28 May 2018, at 9:06 am, Matthias Rebbe via use-livecode 
>>>>> mailto:use-livecode@lists.runrev.com>> 
>>>>> wrote:
>>>>> 
>>>>> Hi,
>>>>> is anyone already using tsNet external with Livecode server? If so, is 
>>>>> there something i should take care of when trying to “install” / copy the 
>>>>> external to my custom installation?
>>>>> 
>>>>> Unfortunately the commercial LC server builds still do not contain the 
>>>>> external.
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Matthias Rebbe
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> ___
>>>>> use-livecode mailing list
>>>>> use-livecode@lists.runrev.com <mailto:use-l

Re: Is anyone using tsNet external with LCserver?

2018-05-29 Thread Charles Warwick via use-livecode
Hi Matthias,

Just to check - did they install the Indy version of the tsNet external?

Regards,

Charles

> On 29 May 2018, at 5:37 am, Matthias Rebbe via use-livecode 
>  wrote:
> 
> Hi Charles,
> 
> thanks. Unfortunately it does not work. I have a Hosting account at HostM.com 
> <http://hostm.com/>. They installed a Livecode server commercial version for 
> me  for all of my accounts months ago, so i do not have to install it for 
> every addon domain folder.
> Today they installed the tsNet External into the Externals folder for me. But 
> it was not working.
> I get this error message:
> file "/home/ua82/public_html/domain1/index.lc"
>  row 2, col 1: Handler: can't find handler (tsNetinit)
> This is what they replied to support request.
> "It looks like you may have to contact the developer of tsNet so they can 
> look into this and run some tests on their end.
> The issue is complicated by the fact that the following commands do not 
> currently seem to work properly on LiveCode Server (9.0.0) in order to verify 
> which externals and their functions etc. have been loaded:
> put the externals of stack “Home"
> put the externalCommands of stack “Home"
> put the externalFunctions of stack “Home"
> put the externalPackages of stack “Home”
> With all of the above command always returning empty, there becomes more 
> difficult to determine if the issue that you’re experiencing is caused by 
> tsNet not wanting to load to begin with, or by a bug in tsNet itself, but the 
> developer should be able to look into this.”
> 
> Any idea what might cause this.
> 
> Regards,
> 
> Matthias
> 
> 
>> Am 28.05.2018 um 05:49 schrieb Charles Warwick via use-livecode 
>> :
>> 
>> Hi Matthias,
>> 
>> You should just need to copy the relevant tsNet external (for Linux x64 it 
>> is tsNet-x64.so) into the external directory from your normal commercial 
>> desktop installation.
>> 
>> After that, just make sure you call tsNetInit before making any other tsNet 
>> calls.
>> 
>> Regards,
>> 
>> Charles
>> 
>>> On 28 May 2018, at 9:06 am, Matthias Rebbe via use-livecode 
>>> mailto:use-livecode@lists.runrev.com>> 
>>> wrote:
>>> 
>>> Hi,
>>> is anyone already using tsNet external with Livecode server? If so, is 
>>> there something i should take care of when trying to “install” / copy the 
>>> external to my custom installation?
>>> 
>>> Unfortunately the commercial LC server builds still do not contain the 
>>> external.
>>> 
>>> Regards,
>>> 
>>> Matthias Rebbe
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com <mailto: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 
>>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com <mailto: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 
>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
> ___
> 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


___
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

Re: Is anyone using tsNet external with LCserver?

2018-05-27 Thread Charles Warwick via use-livecode
Hi Matthias,

You should just need to copy the relevant tsNet external (for Linux x64 it is 
tsNet-x64.so) into the external directory from your normal commercial desktop 
installation.

After that, just make sure you call tsNetInit before making any other tsNet 
calls.

Regards,

Charles

> On 28 May 2018, at 9:06 am, Matthias Rebbe via use-livecode 
>  wrote:
> 
> Hi,
> is anyone already using tsNet external with Livecode server? If so, is there 
> something i should take care of when trying to “install” / copy the external 
> to my custom installation?
> 
> Unfortunately the commercial LC server builds still do not contain the 
> external.
> 
> Regards,
> 
> Matthias Rebbe
> 
> 
> 
> 
> ___
> 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


___
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

Re: Internet library and LC9

2018-05-16 Thread Charles Warwick via use-livecode
Hi Paul,

TsNet tries to reuse existing connections where possible.  While this usually 
is very effective, it can sometimes cause delays like you were experiencing.

Try issuing the command:

 tsNetLibUrlReuseConnection false

Regards,

Charles.

> On 17 May 2018, at 3:34 am, Paul Dupuis via use-livecode 
>  wrote:
> 
> I am transitioning some applications that were built as standalone
> under  LC6.7.11 to LC 9.0.0. In most cases, the migrations are going
> well with mostly appearance issues (due to different default fonts and
> such).
> 
> This week, I have encountered a functional issue. An app (stack) I have,
> as part of the startup sequence, sends a message that fetches a small
> text file on a server, essentially "put URL tURL into tVar". This was
> working fine under LC6.7.11 with no noticeable delay on both Window
> (8.1) and OSX (Mavericks). Now, when built under LC9.0.0, under OSX, the
> internet action takes many seconds to respond - sometimes as much as 30
> seconds or more. Nothing has changed on the OSX box. This is a pure LC6
> to 9 changes issue. Testing suggests that it is the first internet call
> under OSX takes a long time and then all subsequent calls are as speedy
> as you would expect.
> 
> I know LC9 uses tsNet vs the old Internet library. Does tsNet take some
> time to initialize under OSX? or is there some call you need to make to
> pre-initialize tsNet? Anyone run into anything like this and have any
> suggestions or work-arounds?
> 
> 
> ___
> 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


___
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


Re: tsNetSmtpSync (with attachment

2018-03-21 Thread Charles Warwick via use-livecode
Hi,

> On 22 Mar 2018, at 1:57 am, G.W.Gaich via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> 
> schannel: decrypted data buffer: offset 0 length 16384
> 501 Syntax error - line too long
> 

This gives us a clue.  It looks like your mail server is not detecting the line 
endings in the body of the e-mail.

Can you try add the following line just before the call to tsNetSmtpSync (line 
38) in the mouseUp handler of the “Send Email” button:

replace LF with CRLF in tPostData

And see if that makes any difference?

Regards,

Charles

> 
> 
>> Am 21.03.2018 um 09:34 schrieb Charles Warwick via use-livecode:
>> Can you please download the following stack:
>> 
>> https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode
>> 
>> Open it while you have your LCMail stack open, click the “start debug” 
>> button in the above stack, try send an e-mail with an attachment and then 
>> click “stop debug” to stop the timer in the debug field.
>> 
>> That should generate some debug information about your SMTP connection.  If 
>> you can post the results of that (minus any private details) it might help 
>> us to work out what is going on.
>> 
>> Regards,
>> 
>> Charles
>> 
>>> On 21 Mar 2018, at 5:24 am, G.W.Gaich via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hello Charles,
>>> 
>>> thank you for your reply.
>>> 
>>> I have the same result if I disable the anti-virus software.
>>> 
>>> I testet it on another machine (windows 10). I get that error:
>>> 
>>> 
>>> tsneterr: (56) Failure when receiving data from the peer
>>> 
>>> My Mailserver:
>>> smtp.1und1.de
>>> Port is 587
>>> Authentification Method is password, normal
>>> Encryption is STARTTLS
>>> 
>>> 
>>> With Thunderbird I can send emails with attachments
>>> 
>>> Best
>>> Günter
>>> 
>>>> Am 19.03.2018 um 04:07 schrieb Charles Warwick via use-livecode:
>>>> Hi,
>>>> 
>>>> That does seem odd...  Is there any chance you might have some anti-virus 
>>>> software running that might be getting in the way?
>>>> 
>>>> Regards,
>>>> 
>>>> Charles
>>>> 
>>>>> On 14 Mar 2018, at 1:18 am, G. Wolfgang Gaich via use-livecode 
>>>>> <use-livecode@lists.runrev.com> wrote:
>>>>> 
>>>>> Hallo all,
>>>>> 
>>>>> try to send an email with attachment (PDF) from LiveCode with tsNet 
>>>>> (tsNetSmtpSync)
>>>>> 
>>>>> I tried the sample stack "Mail v1.2" from
>>>>> https://downloads.techstrategies.com.au/tsnet/LCMail.livecode
>>>>> 
>>>>> I get an error when I try to send with an attachment (PDF document):
>>>>> 
>>>>> Error tsneterr: (28) schannel: timed out sending data (bytes sent: 0)
>>>>> returned from server
>>>>> 
>>>>> 
>>>>> Without the attachment the email is send.
>>>>> 
>>>>> Windows 7, LC 8.1.9
>>>>> 
>>>>> 
>>>>> Any ideas?
>>>>> 
>>>>> Best
>>>>> Günter
>>>>> 
>>>>> 
>>>>> ___
>>>>> 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
>>>> ___
>>>> 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
>>> 
>>> 
>>> ___
>>> 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
>> ___
>> 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
> 
> 
> 
> ___
> 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


___
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

Re: tsNetSmtpSync (with attachment

2018-03-21 Thread Charles Warwick via use-livecode
Can you please download the following stack:

https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode

Open it while you have your LCMail stack open, click the “start debug” button 
in the above stack, try send an e-mail with an attachment and then click “stop 
debug” to stop the timer in the debug field.

That should generate some debug information about your SMTP connection.  If you 
can post the results of that (minus any private details) it might help us to 
work out what is going on.

Regards,

Charles

> On 21 Mar 2018, at 5:24 am, G.W.Gaich via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hello Charles,
> 
> thank you for your reply.
> 
> I have the same result if I disable the anti-virus software.
> 
> I testet it on another machine (windows 10). I get that error:
> 
> 
> tsneterr: (56) Failure when receiving data from the peer
> 
> My Mailserver:
> smtp.1und1.de
> Port is 587
> Authentification Method is password, normal
> Encryption is STARTTLS
> 
> 
> With Thunderbird I can send emails with attachments
> 
> Best
> Günter
> 
>> Am 19.03.2018 um 04:07 schrieb Charles Warwick via use-livecode:
>> Hi,
>> 
>> That does seem odd...  Is there any chance you might have some anti-virus 
>> software running that might be getting in the way?
>> 
>> Regards,
>> 
>> Charles
>> 
>>> On 14 Mar 2018, at 1:18 am, G. Wolfgang Gaich via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hallo all,
>>> 
>>> try to send an email with attachment (PDF) from LiveCode with tsNet 
>>> (tsNetSmtpSync)
>>> 
>>> I tried the sample stack "Mail v1.2" from
>>> https://downloads.techstrategies.com.au/tsnet/LCMail.livecode
>>> 
>>> I get an error when I try to send with an attachment (PDF document):
>>> 
>>> Error tsneterr: (28) schannel: timed out sending data (bytes sent: 0)
>>> returned from server
>>> 
>>> 
>>> Without the attachment the email is send.
>>> 
>>> Windows 7, LC 8.1.9
>>> 
>>> 
>>> Any ideas?
>>> 
>>> Best
>>> Günter
>>> 
>>> 
>>> ___
>>> 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
>> 
>> ___
>> 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
> 
> 
> 
> ___
> 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
___
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

Re: tsNetSmtpSync (with attachment

2018-03-18 Thread Charles Warwick via use-livecode
Hi,

That does seem odd...  Is there any chance you might have some anti-virus 
software running that might be getting in the way?

Regards,

Charles

> On 14 Mar 2018, at 1:18 am, G. Wolfgang Gaich via use-livecode 
>  wrote:
> 
> Hallo all,
> 
> try to send an email with attachment (PDF) from LiveCode with tsNet 
> (tsNetSmtpSync)
> 
> I tried the sample stack "Mail v1.2" from
> https://downloads.techstrategies.com.au/tsnet/LCMail.livecode
> 
> I get an error when I try to send with an attachment (PDF document):
> 
> Error tsneterr: (28) schannel: timed out sending data (bytes sent: 0)
> returned from server
> 
> 
> Without the attachment the email is send.
> 
> Windows 7, LC 8.1.9
> 
> 
> Any ideas?
> 
> Best
> Günter
> 
> 
> ___
> 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


___
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

Re: tsNet woes

2018-03-18 Thread Charles Warwick via use-livecode
Hi Dan,

LC 8.1.9 has the latest version of tsNet at present.

If this is something you are still experiencing, are you able to share the code 
with me so I can see if I can replicate it?

Regards,

Charles


> On 14 Mar 2018, at 12:37 am, Dan Friedman via use-livecode 
>  wrote:
> 
> Charles,
> 
> I misspoke…  I’m not on 8.1.5, I’m using 8.1.9.   Is there another version 
> you would recommend?
> 
> -Dan
> 
> 
> Hi Dan,
> 
> If tsNetIsSyncBlocked() is always returning true then a connection must be 
> stalled.
> 
> The latest version of tsNet defaults to timing out stalled connections after 
> 30 seconds.  If you want to stay with LC 8.1.5 then just add the following 
> code in your application’s startup:
> 
> tsNetSetTimeouts 60,0,30,6,30,1000
> 
> The last two parameters of this command mean timeout the connection in 30 
> seconds if less than 1000 bytes per second are transferred over this period.
> 
> You can adjust those values to suit your application.
> 
> Regards,
> 
> Charles
> 
> 
>> On Mon, Mar 12, 2018 at 7:11 PM, Dan Friedman via use-livecode <
>> 
>>> Greetings!
>>> 
>>> I have an app I am working on and it’s working perfectly on my Mac and in
>>> the iOS simulator.  However, on an Android device, once I do a couple of
>>> get urls, tsNet stops functioning.   I get a variety of results:
>>> 
>>> Previous request not completed
>>> Sync request already in progress (most common)
>>> tsNet is not initialized
>>> 
>>> Also, tsNetIsSyncBlocked() always returns true.
>>> 
>>> I am using LC Indy 8.1.5.   Any thoughts or advise?
>>> 
>>> -Dan
> 
> ___
> 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


___
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

Re: Not sure what to do.....can I run this by you guys?

2018-03-16 Thread Charles Warwick via use-livecode
Just remember the browser widget in LiveCode uses CEF (Chromium Embedded 
Framework) on all platforms.

It doesn’t need to work on Safari or Firefox.

> On 17 Mar 2018, at 1:40 am, Tom Glod via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> this solution has to work flawlessly in production on all 3 desktop
> platforms.
> 
> I'm giving a shot to modifying LibURL. I wish I knew why the limit is
> in there to begin with, that would help to know if I am wasting my time or
> not.
> 
> Realistically if it was as easy as just hacking that code, someone would
> have done it already.
> 
> Its fun anywaysI have to solve this...even if I speed it up just a
> little bit ..
> 
> Its not an emergency situation so its a fun problem to think about until
> its solved.
> 
> some good ideas from you guys thanks everyone
> 
> On Fri, Mar 16, 2018 at 11:31 AM, Mike Bonner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Yeah, thats what I was talking about, but I never tried it with safari i'm
>> afraid. Sounds like something funky with safari, though i'm not sure why my
>> method wouldn't work unless safari is smart enough now to recognize an
>> inline link and NOT treat it as a new URL to cache.
>> 
>> If this is only for your personal use, you can disable caching on safari as
>> described here: https://www.technipages.com/apple-safari-completely-
>> disable-cache
>> If you have safari 11, check here instead to disable cache:
>> https://stackoverflow.com/questions/46324675/how-do-
>> i-disable-cache-in-safari-11-0
>> 
>> If this is for an app being shipped though thats not a solution.  You said
>> firefox works fine, so i'm guessing you don't have some type of caching
>> proxy between you and the server.  Either way, from what I've been reading
>> just now, rather than using meta tags, you're more likely to get the
>> desired result if you set the headers directly.  One way to do this would
>> be with an .htaccess file.
>> https://stackoverflow.com/questions/11532636/how-to-
>> prevent-http-file-caching-in-apache-httpd-mamp
>> You'd need to add .lc to the filesmatch so that they're not cached.
>> 
>> Hopefully the correct module is installed. If it isn't, while I've never
>> done it, I believe you can set the headers to return using lc in your
>> server script (assuming you're using lc.) I know php can.  If you're using
>> something other than apache of course, ignore the above.
>> 
>> On Fri, Mar 16, 2018 at 8:53 AM, Rick Harrison via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Hi Mike,
>>> 
>>> I am finding that Safari is not honoring
>>> the meta tag to turn off caching.  I thought
>>> I would give your method a try.  I’m not
>>> sure I am doing it right though because
>>> that isn’t working either.
>>> 
>>> (Firefox does everything properly.)
>>> 
>>> I was thinking from your description that
>>> it would look something like:
>>> 
>>> http://www.yourwebsite.com/coolpage.lc#48432 <
>> http://www.yourwebsite.com/
>>> coolpage.lc#48432>
>>> 
>>> Is the above example of what you are discussing
>>> correct?  If not could you please post an example?
>>> 
>>> Thanks,
>>> 
>>> Rick
>>> 
>>>> On Mar 16, 2018, at 9:31 AM, Mike Bonner via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> Another way around the cache problem is to use the #2 trick at the end
>> of
>>>> the url.  Send each request with a pound and different number at the
>> end
>>> of
>>>> the url and it'll be seen as a new request thus doing an end run around
>>> the
>>>> cache.  Since it designates an inline anchor position on the page, it
>>>> should have zero affect on the way the url functions.  (unless things
>>> have
>>>> changed, the associated anchor doesn't need to exist on the page)
>>>> 
>>>> Thanks for the neat trick Charles. :)
>>>> 
>>>> On Fri, Mar 16, 2018 at 7:24 AM, Tom Glod via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>>> WowI'm impressedthats quite a hack Charles..I will study all
>>> this
>>>>> see how far I get.
>>>>> 
>>>>> Thank you gentlemenyou are Rockstars!!
>>>>> 
>>>>> On Fri, Mar 16, 2018 at 7:13 AM, Lagi

Re: Not sure what to do.....can I run this by you guys?

2018-03-16 Thread Charles Warwick via use-livecode
 Hi Tom,

If the site you are trying to contact has CORS enabled appropriately, then you 
can do something like this...

With the LiveCode browser widget, you can call JavaScript functions from LC 
script and have the JavaScript functions call LC handlers in return.  
JavaScript has the capability to perform asynchronous HTTP requests.

You can create a HTML page that you automatically load up in the browser widget 
that has a small JavaScript function which you can call from LC with ‘do in 
widget’.   All this function needs to do is issue an asynchronous HTTP call to 
the URL passed to it as a parameter and when it receives the data, return it 
back to your LC script by calling a nominated LC handler and passing the 
returned data as a parameter.

The HTML page would look something like this:



Javascript Async Test


function httpGetAsync(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() { 
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
liveCode.httpRequestComplete(theUrl, xmlHttp.responseText);
}
xmlHttp.open("GET", theUrl, true); // true for asynchronous 
xmlHttp.send(null);
}






You can either load that from a file into the browser widget’s URL or set its 
htmlText property accordingly...

Then in LC, make sure you register the httpRequestComplete handler so that the 
widget can call it:

set the javascriptHandlers of widget “browser” to “httpRequestComplete”

After that, add a httpRequestComplete handler to the card script to handle the 
returned data:

on httpRequestComplete pUrl, pData
   — pUrl will be the URL requested
   — pData will be the data returned from the URL requested
end httpRequestComplete

Lastly, make your async requests

do (“httpGetAsync(‘http://www.livecode.com’);” in widget “browser”

Since the JavaScript in the browser widget is issuing the requests and sending 
the data back to LC, it doesn’t need to display anything related to it in the 
browser widget itself - it can be a blank canvas.

Just be aware that the browser widget can cache URLs and there is no easy way 
(that I know of?) in LC to clear the browser’s cache... so if you see very 
quick responses on a second or subsequent request to the same URL, it is likely 
pulling it all from the browser’s cache.

Cheers,

Charles

>> On 16 Mar 2018, at 1:35 pm, Tom Glod via use-livecode 
>>  wrote:
>> 
>> Great hints there Mike  thanks alot.  Luckily I'm desktop only right
>> now.
>> 
>> It shouldn't be too long before I sit down to make something that I can
>> rely on and reuse in future projects.
>> 
>> Might turn out I will have to hire someone to help which is cool too.
>> 
>> It only has to be very simple..and does not need to match performance of
>> Tsnet.
>> 
>> Anything more than 1 would be a great start. LOL.
>> 
>> I will look into the libURL library and then try to guess which way I
>> should go my first attempt to hack this.
>> 
>> I'll keep you guys posted on the progress..I think I need a name for this
>> little project.
>> 
>> Thanks you
>> 
>> Tom
___
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

Re: TSNet updated to include PUT and PATCH

2018-03-14 Thread Charles Warwick via use-livecode
Hi Todd,

You can use the tsNetCustom* functions to issue any HTTP(S) request type you 
require (including PATCH and PUT).  The tsNetUpload* functions are also 
effectively just a PUT request when using the HTTP(S) protocols.

Let me know if you need any more info.

Cheers,

Charles

> On 14 Mar 2018, at 6:49 pm, Todd Fabacher via use-livecode 
>  wrote:
> 
> Hello Charles and LC community,
> 
> As we start to use more JSON databases and REST APIs, we are going to need
> to get HTTPS PATCH. This is a commonly used function used by many REST
> services.
> 
> We are currently doing Google Firebase for LiveCode and they make extensive
> use of PATCH. We can get by with just POST, but we would prefer if we could
> get PUT and PATCH on mobile.
> 
> Is there any plan at all on the roadmap??
> 
> --Todd
> ___
> 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
> 


___
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


Re: tsNet and Digest Authentication - some problems or better said: missing knowledge

2018-03-13 Thread Charles Warwick via use-livecode
Hi Matthias,

It looks to me that you are issuing a put URL request to the same URL each 
time?  Are you using the latest version of LC?

I think I know what is going on, but will need to generate a new tsNet build 
and get you to test to see if it resolves the issue.

Can you please raise a bug report and I will follow up there.

Regards,

Charles

> On 9 Mar 2018, at 6:10 pm, Matthias Rebbe via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Charles, 
> thanks for your answer.
> 
> I´ve done as requested. 
> With tsNetLibUrlReuseConnection set to true
> A session cookie is sent from the PABX after the first successful connection.
> The 2nd unsuccessful connection shows
> 
> "HTTP/1.1 401 Unauthorized
> Authentication problem. Ignoring this.”
> 
> And the value for nonce is an other then the one in the first connection.
> 
> After a restart of LC i set  it to false.
> The error messages looks similar, but i can see also
> "Issue another request to this URL: 
> 'http://sub-admin:feierabend@192.168.1.1/app_group_logchange?grpId=2641=0
>  
> <http://sub-admin:feierabend@192.168.1.1/app_group_logchange?grpId=2641=0>'
> Hostname 192.168.1.1 was found in DNS cache”
> 
> 
> I´ve uploaded the complete debug files here:
> 
> https://dl.qck.nu//?dl=liburl_reuse_false.txt 
> <https://dl.qck.nu//?dl=liburl_reuse_false.txt>
> https://dl.qck.nu//?dl=LIBUURL_resue_true.txt 
> <https://dl.qck.nu//?dl=LIBUURL_resue_true.txt>
> 
> Regards,
> Matthias
> 
> Matthias Rebbe
> Tel +49 5741 31
> ‌https://matthiasrebbe.eu <https://matthiasrebbe.eu/>‌
> 
>> Am 09.03.2018 um 04:18 schrieb Charles Warwick via use-livecode 
>> <use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>:
>> 
>> Hi Matthias,
>> 
>> That does sound strange.
>> 
>> If you download the following stack:
>> 
>> https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode 
>> <https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode>
>> 
>> Open that stack at the same time as you have your application stack open in 
>> the IDE, click the “Start Debug” button, and try your PUT requests.
>> 
>> That will display some debug information that might help us work out what is 
>> going on.
>> 
>> On a related note, ‘tsNetLibUrlReuseConnection false’ should create a fresh 
>> connection to the server for the 2nd request, so debug with and without that 
>> set would be useful.
>> 
>> Regards,
>> 
>> Charles
>> 
>>> On 8 Mar 2018, at 9:28 pm, Matthias Rebbe via use-livecode 
>>> <use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> 
>>> wrote:
>>> 
>>> Hi,
>>> 
>>> i am trying to use the tsNet external to communicate with an Auerswald PABX 
>>> which requires digest authentication.
>>> 
>>> The first connection is always successful  using  PUT URL …..
>>> The second one isn´t. There is even no value returned.
>>> When i use tsNetClose and tsNetInit before the 2nd connection then the 2nd 
>>> connection is successful, because the complete authentication process is 
>>> initiated from the beginning.
>>> So this works so far
>>> —>
>>> tsnetClose
>>> tsNetInit
>>> put URL “http:…..”
>>> 
>>> But how can i use the already established connection? 
>>> tsNetLibUrlReuseConnection FALSE does not help. 
>>> Is it possible that i have to set the httpheader somehow for the 2nd 
>>> connection?
>>> I am not very happy to unload and reload the external every time.
>>> 
>>> I also tried to use tsNetGetSync. The first connection is also always 
>>> successful, the 2nd not.
>>> 
>>> So what am i missing?
>>> 
>>> Regards,
>>> 
>>> Matthias
>>> 
>>> 
>>> 
>>> Tel +49 5741 31
>>> ‌https://matthiasrebbe.eu <https://matthiasrebbe.eu/> 
>>> <https://matthiasrebbe.eu/ <https://matthiasrebbe.eu/>>‌
>>> 
>>> 
>>> 
>>> Matthias Rebbe
>>> Tel +49 5741 31
>>> ‌https://matthiasrebbe.eu <https://matthiasrebbe.eu/> 
>>> <https://matthiasrebbe.eu/ <https://matthiasrebbe.eu/>>‌
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
>>> Please visit this url to subscribe, unsubscribe 

Re: tsNet woes

2018-03-13 Thread Charles Warwick via use-livecode
Hi Dan,

If tsNetIsSyncBlocked() is always returning true then a connection must be 
stalled.

The latest version of tsNet defaults to timing out stalled connections after 30 
seconds.  If you want to stay with LC 8.1.5 then just add the following code in 
your application’s startup:

tsNetSetTimeouts 60,0,30,6,30,1000

The last two parameters of this command mean timeout the connection in 30 
seconds if less than 1000 bytes per second are transferred over this period.

You can adjust those values to suit your application.

Regards,

Charles

> On 13 Mar 2018, at 2:31 pm, Tom Glod via use-livecode 
>  wrote:
> 
> do yo have  a firewall app or anything that filters your traffic?
> inconsistent behavior like that usually means something is acting on your
> traffic
> 
> On Mon, Mar 12, 2018 at 7:11 PM, Dan Friedman via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Greetings!
>> 
>> I have an app I am working on and it’s working perfectly on my Mac and in
>> the iOS simulator.  However, on an Android device, once I do a couple of
>> get urls, tsNet stops functioning.   I get a variety of results:
>> 
>> Previous request not completed
>> Sync request already in progress (most common)
>> tsNet is not initialized
>> 
>> Also, tsNetIsSyncBlocked() always returns true.
>> 
>> I am using LC Indy 8.1.5.   Any thoughts or advise?
>> 
>> -Dan
>> ___
>> 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
> ___
> 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


___
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

Re: is tsnet downwards compatible?

2018-03-13 Thread Charles Warwick via use-livecode
Hi Tiemo,

Unless you are deploying to iOS devices, you should be ok to use the latest 
version of tsNet with LC 8.1.4.  Each build of tsNet contains iOS binaries 
specifically for the version of LC it relates to.

Cheers,

Charles

> On 9 Mar 2018, at 8:16 pm, Tiemo Hollmann TB via use-livecode 
>  wrote:
> 
> Hello,
> 
> 
> 
> can I take the newest tsnet.dll (from 8.1.9 or 9..0dp4) and use it with LC
> 8.1.4? Is it downward compatible?
> 
> 
> 
> The reason I ask for is, that I need the newest tsnet because of some proxy
> server problem in older version, but I can't use LC newer than 8.1.4 because
> it can't play mp4 videos on some windows machines. So I wanted to stay with
> LC 8.1.4 and just copy manually the tsnet from 9.0
> 
> Should this be a good idea?
> 
> 
> 
> Thanks
> 
> Tiemo
> 
> 
> 
> 
> 
> ___
> 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
> 


___
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


Re: tsNet and Digest Authentication - some problems or better said: missing knowledge

2018-03-08 Thread Charles Warwick via use-livecode
Hi Matthias,

That does sound strange.

If you download the following stack:

https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode

Open that stack at the same time as you have your application stack open in the 
IDE, click the “Start Debug” button, and try your PUT requests.

That will display some debug information that might help us work out what is 
going on.

On a related note, ‘tsNetLibUrlReuseConnection false’ should create a fresh 
connection to the server for the 2nd request, so debug with and without that 
set would be useful.

Regards,

Charles

> On 8 Mar 2018, at 9:28 pm, Matthias Rebbe via use-livecode 
>  wrote:
> 
> Hi,
> 
> i am trying to use the tsNet external to communicate with an Auerswald PABX 
> which requires digest authentication.
> 
> The first connection is always successful  using  PUT URL …..
> The second one isn´t. There is even no value returned.
> When i use tsNetClose and tsNetInit before the 2nd connection then the 2nd 
> connection is successful, because the complete authentication process is 
> initiated from the beginning.
> So this works so far
> —>
> tsnetClose
> tsNetInit
> put URL “http:…..”
> 
> But how can i use the already established connection? 
> tsNetLibUrlReuseConnection FALSE does not help. 
> Is it possible that i have to set the httpheader somehow for the 2nd 
> connection?
> I am not very happy to unload and reload the external every time.
> 
> I also tried to use tsNetGetSync. The first connection is also always 
> successful, the 2nd not.
> 
> So what am i missing?
> 
> Regards,
> 
> Matthias
> 
> 
> 
> Tel +49 5741 31
> ‌https://matthiasrebbe.eu ‌
> 
> 
> 
> Matthias Rebbe
> Tel +49 5741 31
> ‌https://matthiasrebbe.eu ‌
> 
> ___
> 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


___
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

Re: tsNet documentation

2018-03-07 Thread Charles Warwick via use-livecode
Hi Matthias,

Yes, it supports digest authentication.  tsNet will automatically use the most 
secure method the server supports unless you force it to use basic 
authentication.

Regards.

Charles

> On 8 Mar 2018, at 1:11 am, Matthias Rebbe via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Charles,
> 
> thank you very much for that. That is really very useful.
> 
> Btw. does tsNet support Digest Access Authentication (DAA) (RFC 2617)?
> 
> Regards,
> Matthias 
> 
> 
> 
>> Am 07.03.2018 um 11:20 schrieb Charles Warwick via use-livecode 
>> <use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>:
>> 
>> Hi,
>> 
>> Just a quick update to let everyone know that I have uploaded a series of 
>> lessons on tsNet to the LiveCode web site.  You can view them at:
>> 
>> http://lessons.livecode.com/m/4071/c/235433 
>> <http://lessons.livecode.com/m/4071/c/235433>
>> 
>> I am continuing to upload more lessons as I have time so please let me know 
>> if there is any particular task that can be done with tsNet that you would 
>> like to see a lesson on.
>> 
>> There is also now an online tsNet command reference guide for those who want 
>> an easily searchable format of all the tsNet commands that are available.  
>> You can find it at:
>> 
>> https://www.techstrategies.com.au/tsnet-command-list/
>> 
>> Regards,
>> 
>> Charles Warwick
>> Tech Strategies
>> ___
>> 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
> 
> ___
> 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
> 


___
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


tsNet documentation

2018-03-07 Thread Charles Warwick via use-livecode
Hi,

Just a quick update to let everyone know that I have uploaded a series of 
lessons on tsNet to the LiveCode web site.  You can view them at:

http://lessons.livecode.com/m/4071/c/235433

I am continuing to upload more lessons as I have time so please let me know if 
there is any particular task that can be done with tsNet that you would like to 
see a lesson on.

There is also now an online tsNet command reference guide for those who want an 
easily searchable format of all the tsNet commands that are available.  You can 
find it at:

https://www.techstrategies.com.au/tsnet-command-list/

Regards,

Charles Warwick
Tech Strategies
___
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


Re: Overwriting a file on a server

2018-03-06 Thread Charles Warwick via use-livecode
Hi,

> Graham Samuel wrote:
> 
>> However, I don’t seem to be able to mimic what my FTP software
>> (Transmit on the Mac, or FileZilla) can do, which is to easily delete
>> a file on a server  - the file in question is part of a web site
>> hosted by DreamHost. I just want to use the URL functionality to do
>> this, as discussed in my conversation below, but I always get 405
>> (http) or 530 (ftp). I have a vague suspicion that I should be
>> transmitting my credentials to the server, which of course I did when
>> I set up my FTP client, but I have absolutely no idea how to do this.

Using delete via HTTP will generally fail unless the HTTP server and website 
are specifically configured to allow it (it would usually also require 
credentials).  Some HTTP APIs do allow the DELETE method.  I expect this is not 
what you are after. :-)

As you mentioned above, Transmit would be doing this via FTP, but you would 
need to send your credentials as part of the request.  You can do this with put 
URL and delete URL (for any supported protocol) by encoding them into the URL 
that you use like this:

put urlEncode(“username”) into tUser
put urlEncode(“password”) into tPass
put “ftp://“ & tUser & “:” & tPass & “@ftp.mydomain.com/path/to/file.txt” into 
tUrl

I expect that would likely solve your issue, but as Richard has mentioned, 
there are security issues to be considered that are all dependant on the 
environment that you are using your application in.

Cheers.

Charles



___
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

Re: Overwriting a file on a server

2018-03-06 Thread Charles Warwick via use-livecode
Hi Graham,

> On 5 Mar 2018, at 11:04 pm, Graham Samuel via use-livecode 
>  wrote:
> 
> Another dumb question, I’m afraid. The dictionary says I can do
> 
>  put tdata into URL [some url]
> 
> well, I want to put a file on my server (in this example, it’s a text file) 
> to replace one of the same name. If I just try to steamroller it by ignoring 
> the existing file, I get a ‘405’ error (forbidden method, I think). If I use 
> an FTP client like Transmit, I get a warning about overwriting the file and a 
> manual override.
> 
> How can I grow my own, by detecting the existing file and then overwriting it 
> anyway? Should I delete the existing file as a separate operation? How can I 
> be sure I have enough permission to do so?

You can use ‘delete URL’ to delete an FTP file.  If the result is not empty, 
then it failed to delete it.

You could always try the ‘put’ first, and if you get a 405 error, try the 
‘delete’.  If the delete is successful, you can ‘put’ again.  If the delete is 
unsuccessful, advise the user.

Cheers,

Charles

___
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

Re: Get URL anomaly

2018-03-05 Thread Charles Warwick via use-livecode
Hi Graham,


> On 5 Mar 2018, at 10:56 pm, Graham Samuel via use-livecode 
>  wrote:
> 
> As in some of my previous mails, I’m talking about having to retrieve a tiny 
> text file from a server (and later put a modified version of it back, but 
> let’s get one problem solved at a time) The whole thing is just a few lines 
> of code:
> 
> constant myFileOnTheServer = "www.myserver.comm/mytextfile.txt”
> 
> put “http://“ & myFileOnTheServer into t1
> 
> get URL t1
> 
> if the result is empty then
> 
>do stuff with ‘it’, where the text file is placed
> 
>   …

I would recommend using:

put URL t1 into tData

The contents of ‘it’ can be changed by other commands, so if you are having 
issues in a more complex app, maybe something else is overwriting that value?

Cheers,

Charles

___
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

Re: tsNet or not tsNet?

2018-03-05 Thread Charles Warwick via use-livecode
Hi Graham,

In commercial versions of LiveCode, the default behaviour of the Internet 
library (libUrl) is to include and use tsNet.

It calls tsNetInit on startup so that you don’t need to do that separately.

Hope that helps,

Charles

> On 5 Mar 2018, at 7:21 pm, Graham Samuel via use-livecode 
>  wrote:
> 
> I’ve been executing this line of script in an app made on a Mac with LC 9.0.0 
> dp11
> get URL “http://www.myserver.com/mytextfile 
> .txt
> 
> It works fine, but I also wanted to detect what happens when the connection 
> can't be established, so I made the command fail by switching off internet 
> access on my machine. I got an error in ‘the result’, as expected. Or at 
> least I got one when the line was executed in the IDE, and this was a tsNet 
> error. As I had not initialised tsNet in my script - according to the 
> dictionary, this **must** be done before tsNet functions are used - I 
> concluded that the IDE had done it for me.
> 
> Fair enough, but I then reasoned that if I wanted to see the same kind of 
> explicit error messages in my standalone, I would have to include a call to 
> tsNetInit in my script. However, I created a little test app which 
> **doesn’t** make any tsNet calls, certainly not initialising the package, but 
> I still get a tsNet style error, e.g.
> 
>> tsneterr: (6) Could not resolve host: www.myserver.com 
> 
> So, what’s going on? Is tsNet now always included in a standalone, and if so, 
> how does it get initialised?
> 
> Puzzled, not for the first time.
> 
> Graham
> 
> ___
> 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


___
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

Re: libsodium on LiveCode?

2018-02-21 Thread Charles Warwick via use-livecode
What type of key do you need to generate?

> On 21 Feb 2018, at 2:50 pm, Brian Milby via use-livecode 
>  wrote:
> 
> Had not seen the tsNet handler, but that is an RSA key. Scuttlebutt uses a
> different key type. There are other useful things in the library. There is
> some overlap, but enough different to make it worthy of an effort.
> 
> I’ll need to take a look at the MS links.
> 
> Hopefully the rest of today and tomorrow will go better!
> On Tue, Feb 20, 2018 at 10:13 PM Monte Goulding via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> 
>> 
>>> On 21 Feb 2018, at 2:57 pm, Brian Milby  wrote:
>>> 
>>> Monte, you are awesome!
>> 
>> Cheers! Not feeling so awesome today… been banging my head on something
>> all day and getting nowhere :-(
>>> 
>>> With your help I was able to generate a key pair using libSodium. That
>> means that we are one huge step closer to asymmetric key generation and use
>> within LC.
>> 
>> Hmm… have you seen tsNetGenerateKey ?
>>> 
>>> For each tool chain they provided a static and dynamic directory. The
>> static just contained a .lib file. The dynamic contains 3 or 4 files.
>> Starting at 140 a .pdb file is added. The latest one that works is v120.
>>> 
>>> Thanks for the help!
>> 
>> OK, I’m not sure why they aren’t working. The main thing I’d look for is
>> if they are built to dynamic link to the CRT and you don’t have the
>> corresponding version of MSVS or the redistributable packages installed.
>> You could try installing this and then test 140
>> https://www.microsoft.com/en-au/download/details.aspx?id=48145 <
>> https://www.microsoft.com/en-au/download/details.aspx?id=48145>
>> 
>> Cheers
>> 
>> Monte
>> 
>> ___
>> 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
> ___
> 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


___
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

Re: non-blocking http ... will tsnet end up in community?

2017-12-20 Thread Charles Warwick via use-livecode
Hi Richard,

> Is it?
> 
> DDoS tools aside , what APIs need more than one call at a time?

Not that I am Tom, but many APIs need different calls to retrieve various 
pieces of information.  Just as a simple example, if you are writing a weather 
app and you want to display on one screen the temperatures for multiple cities, 
you may have to make an API call for each city before you can render the entire 
screen.

> And since LC is single-threaded, what do you anticipate doing with the data 
> from the multiple requests as it comes in?

The issue is usually that API calls can take time for the server to respond.  
By executing them in series, if you had to make 10 calls and each one takes 
500ms, that is 5 seconds of delay.

If you can send all 10 requests at once, you are likely to be waiting less than 
1 second in total - which makes a significant improvement for user experience.

> This is a serious question.  Most of my work is with small data (<200k) where 
> latency even on shared hosts is minimal.  But needs vary.  I'm interested in 
> understand the problem you're facing.
> 

This may not be the problem Tom is facing, but it is one I deal with regularly.

Cheers.

Charles


> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> 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
> 


___
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


Re: libUrl tsNet and socketTimeoutInterval

2017-12-12 Thread Charles Warwick via use-livecode
BR,

You can definitely monitor all of your connections that use tsNet by setting a 
status callback like you have mentioned below.

The overhead of doing this will be determined by the amount of processing you 
do within the callback function.

Cheers,

Charles

> On 11 Dec 2017, at 5:46 am, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> @ Charles
> 
> It would appear that perhaps there is a possible global approach that could 
> cover a wide variety of net access conditions.
> 
> am I being naïve or could it be this simple?
> 
> if we just have this running and available all the time
> 
> tsNetSetTimeouts… [add your params here] 
> 
> tsNetSetStatusCallback "urlCallProgressUpdate"
> 
> on urlCallProgressUpdate
>  # check the status of any and all URL download operations
>  # give user feedback in case connection drops or transfers speed drops below 
> low limit
> end urlCallProgressUpdate
> 
> maybe that's really all that is needed. Then we don't worry about or code any 
> kind of status monitoring into specific URL operations.
> 
> One could "dynamically" change the time outs if different scenarios called 
> for allowing longer time spans, i.e users expect a wait while downloading a 
> "package" but they the don't when loading a web page.
> 
> we might simply have this in back script for the whole app
> 
> command toggleNetMonitor  pBool
>  if pBool = "true" then
>  tsNetSetStatusCallback urlCallProgressUpdate
>  else
>tsNetSetStatusCallback ""  
>  end if
> end   toggleNetMonitor 
> 
> I don't know if there is any overhead to leaving this call back be live 
> "24-7-365" in the app or not… but this way we could turn it on and off if 
> that is better practice.
> 
> BR
> 
> 
> On 12/8/17, 5:08 PM, "use-livecode on behalf of Sannyasin Brahmanathaswami 
> via use-livecode"  use-livecode@lists.runrev.com> wrote:
> 
>Ralph -- I sent this to you off list by mistake
> 
>copying here FWIW if anyone is lurking. This all looks great and covers 
> "download files" use cases
> 
>The remaining puzzles are one off url calls from/for mobile controls :
> 
>1)  remote path to audio.mp3; for player
>2) url web calls in browser widget to
> a) web pages
> b) youtube (video streaming)
> 
>and how these play with TSNet, bandwidth dropping below set limits, or 
> dropped connections.
> 
>As yet mysterious….
> 
> 
> 
> 
>"  wrote:
> 
>BR,
> 
>I async also works in iOS just fine and dandy. In My app I am getting 
> the background images for cards while the user first logs in. Async allows 
> the images to be downloaded in the background. This allows me to change 
> images without releasing a new app without hanging the app up when I used 
> blocking libURL. The implementation was so easy it was frightening. I also 
> have 6 of these queued up and running at the same time!
> 
>First is a utility(NetworkType) to check the type of networking and a 
> tsNet initialization handler (EISinitTSnet):
> 
>
>function GetNetworkType
>   local tLibUrlDriver
> 
>   try
>  put the behavior of stack"revLibUrl"into tLibUrlDriver
>   end try
>   if tLibUrlDriver is empty then
>  return "Sockets"
>   else
>  return "tsNet"
>   end if
> 
>end GetNetworkType
> 
>command NetworkType
>   if GetNetworkType() = "Sockets" then
>  answer"tsNet is disabled"
>   else
>  answer "tsNet in use"&"Version==>"& tsNetVersion()
>   end if
>end NetworkType
> 
>command EISinitTSnet
>   local tResult
> 
>   try
>  tsNetInit
>  put the result into tResult
>  if tResult is not empty then
> if tResult = "tsneterr: Already initialised" then
> else
>answer tResult
> end if
>  else
> tsNetSetTimeouts 60, 5000, 5000, 5000, 5, 1
>  end if
>   catch someerror
>  if IsInternalUser(true) then answer TranslateError(someerror)
>   end try
>end EISinitTSnet
> 
>
> 
> 
>The Get_Path function below is a function returns paths that are 
> transparent between IDE and mobile. (Richard G. I got sucked into the 
> returning the trailing slash before I realized it was not the best way to do 
> it). I hacked out this code so there could be an error but the basic idea is 
> here.
> 
>I call this first handler(StartBackgroundImageDownload) 12 time 
> quickly and all the downloads work. The app is fully functional while the 
> downloads are 

Re: TSNet error (18)

2017-12-12 Thread Charles Warwick via use-livecode
Hi Jacque,

An error code of 18 generally indicates that the server reported the transfer 
would be a certain length, and then it ended up being shorter or longer than 
expected.

In your user’s case, it sounds like the actual downloaded amount is smaller 
than it should be?  As you have said, given that other users are not having 
this issue, it doesn’t sound like a problem on the server end...

Is there possibly a proxy being used that might be getting in the way?

Regards,

Charles

> On 11 Dec 2017, at 7:34 am, J. Landman Gay via use-livecode 
>  wrote:
> 
> A user is getting TSNet error 18 (transfer closed prematurely) when 
> downloading a stack from a server on AWS. The same stack is working fine for 
> virtually everyone else, so it's something on her end. We'd like to point her 
> in the right direction, does anyone know why this might happen to a single 
> user out of many, many others?
> 
> She's running Windows 10 if that matters. Something must be cutting off the 
> transmission, there's 556 bytes remaining to download when it stops.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> 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
> 


___
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

Re: libUrl tsNet and socketTimeoutInterval

2017-12-08 Thread Charles Warwick via use-livecode
Hi Ralph,

There currently isn’t any ability to query the existing timeout values, though 
the default values are listed in the dictionary.  I will look to add that 
ability in an upcoming release.

If the Internet library is included in your application, it will automatically 
call tsNetInit for you on startup (which is what happens in the IDE) as it uses 
tsNet if it is available (and not disabled).

If your application does not include the Internet library, but does include 
tsNet, you will need to call tsNetInit.

Regards,

Charles

> On 8 Dec 2017, at 9:55 am, Ralph DiMola via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Ok, I just got async tsNet working in IDE and Android(Testing iOS later). I 
> works great! Hat tip to all the contributors. One question and one 
> Observation:
> 1) How do you query the current tsNet timeout settings? I have quite a few 
> places where I save the socketTimeoutInterval, set it to a new value, do 
> something and then set it back to the saved timeout. I don't see a way to 
> query this in the dictionary.
> 2) I seems the you don't need to do a "tsNetInit" in the IDE. In the IDE one 
> gets "tsneterr: Already initialized". On Android this error does not occur.
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of Charles Warwick via use-livecode
> Sent: Thursday, December 07, 2017 4:53 PM
> To: How to use LiveCode
> Cc: Charles Warwick
> Subject: Re: libUrl tsNet and socketTimeoutInterval
> 
> Sorry for the confusion, tsNet does handle the ‘load’ function, effectively 
> using its own asynchronous functions to replicate standard libUrl behaviour.
> 
>> On 8 Dec 2017, at 6:44 am, Sannyasin Brahmanathaswami via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Thanks Charles…we have enough to go on now. 
>> 
>> well, almost
>> 
>> if I read you right "load" is not handled by TSNet (since that is libURL's 
>> own asynchronous operation?)
>> 
>> 
>> 
>> 
>> www.himalayanacademy.com <http://www.himalayanacademy.com> Get the SivaSiva 
>> App today (for iPhone and iPad)
>> https://itunes.apple.com/us/app/sivasiva/id1271260502?mt=8
>> 
>> 
>> 
>> 
>> On 12/6/17, 10:43 PM, "use-livecode on behalf of Charles Warwick via 
>> use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
>> use-livecode@lists.runrev.com> wrote:
>> 
>>   Sorry, divide my figures for the last parameter to tsNetSetTimeouts by 8, 
>> it has been a long day
>> 
>> ___
>> 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
> 
> 
> ___
> 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
> 
> 
> ___
> 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


___
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

Re: libUrl tsNet and socketTimeoutInterval

2017-12-07 Thread Charles Warwick via use-livecode
Sorry for the confusion, tsNet does handle the ‘load’ function, effectively 
using its own asynchronous functions to replicate standard libUrl behaviour.

> On 8 Dec 2017, at 6:44 am, Sannyasin Brahmanathaswami via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Thanks Charles…we have enough to go on now. 
> 
> well, almost
> 
> if I read you right "load" is not handled by TSNet (since that is libURL's 
> own asynchronous operation?)
> 
> 
> 
> 
> www.himalayanacademy.com <http://www.himalayanacademy.com> Get the SivaSiva 
> App today (for iPhone and iPad)
> https://itunes.apple.com/us/app/sivasiva/id1271260502?mt=8
> 
> 
> 
> 
> On 12/6/17, 10:43 PM, "use-livecode on behalf of Charles Warwick via 
> use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
> use-livecode@lists.runrev.com> wrote:
> 
>Sorry, divide my figures for the last parameter to tsNetSetTimeouts by 8, 
> it has been a long day
> 
> ___
> 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


___
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

Re: AW: tsNet and proxy servers? Charles?

2017-12-07 Thread Charles Warwick via use-livecode
Hi Tiemo,

I think it is included in LC 8.1.5 - definitely in 8.1.6.

You could also use 8.1.7 which includes a newer tsNet version (1.3.2).

To check which version you are using, open the message box and type ‘put 
tsNetVersion()’

Cheers,

Charles

> On 7 Dec 2017, at 8:52 pm, Tiemo Hollmann TB via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Charles,
> thanks for your response.
> Can you tell me, in what LC version tsNet 1.2.10 is being used (I can't go
> with LC 9 yet)
> I had a look into the tsNet.dll, but can't find any version #
> 
> Thanks
> Tiemo
> 
> 
> -Ursprüngliche Nachricht-
> Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
> von Charles Warwick via use-livecode
> Gesendet: Donnerstag, 7. Dezember 2017 10:56
> An: How to use LiveCode <use-livecode@lists.runrev.com>
> Cc: Charles Warwick <char...@techstrategies.com.au>
> Betreff: Re: tsNet and proxy servers? Charles?
> 
> Hi Tiemo,
> 
> I am not aware of any issues in the latest version of tsNet with regards to
> proxy servers, however there were some fixes for proxy NTLM authentication
> addressed in tsNet 1.2.10.
> 
> Without knowing the specifics of the networks your application is being used
> in, I cannot say if that would address the issue your customers are
> experiencing.  I would recommend trying the latest version of LC and seeing
> if that resolves their issues.
> 
> You could also try get a copy of the output of the debug output from tsNet
> (see the tsNetSetDebugCallback command) from your application in one of
> these environments - it may assist in finding out what the actual issue is.
> 
> Regards,
> 
> Charles
> 
>> On 5 Dec 2017, at 2:29 am, Tiemo Hollmann TB via use-livecode
> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hello,
>> 
>> I am using very simple "put URL myUrl.php into myResult". Since 
>> Version 8 (and still in 8.1.4) I have again and again institutional 
>> customers like schools or government networks with proxys and 
>> firewalls, where the tsNet doesn't succeed to connect to myServer thru 
>> the proxys with different error messages. My old LC 6.x went thru 
>> those proxies without any problems after having set the proxy data 
>> into the httpheaders. I can't find any version # in the tsNet files, 
>> so I can't exactly tell, which version of tsNet I am using in LC 8.1.4,
> perhaps it is 1.2.8.
>> 
>> Since I have a backdoor in my program without connecting to the 
>> internet and thoses admins don't like long testing and debugging 
>> procedures I couldn't dig any deeper to get more details yet and 
>> always had to offer a quick workaround to those customers. And I can't
> reproduce the issue here.
>> 
>> 1.   Is this a known issue and any solution in progress? (Charles?)
>> 
>> 2.   Is this issue perhaps already solved in 8.1.7 or higher?
> (Charles?)
>> 
>> Thanks
>> 
>> Tiemo
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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
>> 
> 
> 
> ___
> 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
> 
> 
> ___
> 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
> 


___
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

Re: tsNet and proxy servers? Charles?

2017-12-07 Thread Charles Warwick via use-livecode
Hi Tiemo,

I am not aware of any issues in the latest version of tsNet with regards to 
proxy servers, however there were some fixes for proxy NTLM authentication 
addressed in tsNet 1.2.10.

Without knowing the specifics of the networks your application is being used 
in, I cannot say if that would address the issue your customers are 
experiencing.  I would recommend trying the latest version of LC and seeing if 
that resolves their issues.

You could also try get a copy of the output of the debug output from tsNet (see 
the tsNetSetDebugCallback command) from your application in one of these 
environments - it may assist in finding out what the actual issue is.

Regards,

Charles

> On 5 Dec 2017, at 2:29 am, Tiemo Hollmann TB via use-livecode 
>  wrote:
> 
> Hello,
> 
> I am using very simple "put URL myUrl.php into myResult". Since Version 8
> (and still in 8.1.4) I have again and again institutional customers like
> schools or government networks with proxys and firewalls, where the tsNet
> doesn't succeed to connect to myServer thru the proxys with different error
> messages. My old LC 6.x went thru those proxies without any problems after
> having set the proxy data into the httpheaders. I can't find any version #
> in the tsNet files, so I can't exactly tell, which version of tsNet I am
> using in LC 8.1.4, perhaps it is 1.2.8.
> 
> Since I have a backdoor in my program without connecting to the internet and
> thoses admins don't like long testing and debugging procedures I couldn't
> dig any deeper to get more details yet and always had to offer a quick
> workaround to those customers. And I can't reproduce the issue here.
> 
> 1.   Is this a known issue and any solution in progress? (Charles?)
> 
> 2.   Is this issue perhaps already solved in 8.1.7 or higher? (Charles?)
> 
> Thanks
> 
> Tiemo
> 
> 
> 
> 
> 
> ___
> 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
> 


___
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


Re: libUrl tsNet and socketTimeoutInterval

2017-12-07 Thread Charles Warwick via use-livecode
Sorry, divide my figures for the last parameter to tsNetSetTimeouts by 8, it 
has been a long day!

> On 7 Dec 2017, at 6:33 pm, Charles Warwick  
> wrote:
> 
> BR,
> 
> 
>> OK, now going over to the forum on this dropbox thread I see Jacque's and 
>> Charle's comments. 5 secs seems a little long.. so if we use the algorithm 
>> "We want to tell users what is up or dim content options from remote servers 
>> in 3 seconds"  (and FTP is not in the cards) we get: 
>> 
>> tsNetSetTimeouts 60, 3000, 3000 , , 3, 12000
>> 
>> This translates "you must have a 96kbps connection or else…"  right?
>> 
>> FYI the dictionary does not declare units for the pLowSpeedTime, it should… 
>> I've assumed integers = seconds and not milliseconds for param 5.
> 
> 
> I will get that fixed in the dictionary in the next version, thanks for 
> letting me know.
> 
> tsNetSetTimeouts uses the last two parameters to determine if a connection 
> should be dropped if the “average” speed of the transfer falls below the 
> values set.
> 
> To use your example, if you want to ensure that the average speed of the 
> transfer does not fall below 96kbps, calculating the average speed over a 3 
> second period, you would specify a value of 3 for the second last parameter 
> and 96000 (96kbps x 1000 bytes per kB) for the last parameter to 
> tsNetSetTimeouts.
> 
> 
>> Second  (dumb) question: how do we trap for the timeout? we keep checking 
>> the tsNetStatusCallback on a loop? and if and when we see timeout we inform 
>> the user? But we need a connectionID, so how do we extract a connectionID 
>> from put/get/set/ http urls? where we are targeting  browser widget on a 
>> card. Or a mobilePlayer?
> 
> 
> If you are using a standard synchronous libUrl request (put URL, post x to 
> URL, etc...) then the request will abort as soon as the connection speed 
> falls below the threshold specified and an error will be stored in the result.
> 
> For asynchronous tsNet requests, the callback message will be sent with an 
> error code indicating the failure.
> 
> Hope that helps,
> 
> Cheers.
> 
> Charles
> 


___
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

Re: libUrl tsNet and socketTimeoutInterval

2017-12-07 Thread Charles Warwick via use-livecode
BR,


> On 7 Dec 2017, at 5:00 am, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> Matthias Rebbe wrote:
> 
>The connection ID is only used/needed when you use the asynchronous 
> commands of tsNet.   The synchronous commands like tsNetUploadSync or 
> tsNetFileUploadSync or others (they are ending with Sync) do not use 
> connectionIDs. And i assume that put URL and get URL are using the 
> synchronous commands.
>Matthias
> ---
> OK then…. if we do this:
> 
> 1) tsNetSetTimeouts 60, 3000, 3000 , , 3, 12000
> 
> 2) get url….


At this point, if the speed drops below 12kbps, then the get URL command will 
return with the result set to indicate failure.


> 
> 3) how do we trap the SocketTimeOut  whose syntax requires a socketID
> 
> from dictionary: 
> 
> Syntax:
> 
> socketTimeout pSocketID
> 
> ?


tsNet does not use standard LiveCode sockets, so socketTimeout does not affect 
connections using it.

Regards,

Charles

> 
> 
> 
> ___
> 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


___
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

Re: libUrl tsNet and socketTimeoutInterval

2017-12-07 Thread Charles Warwick via use-livecode
BR,


> OK, now going over to the forum on this dropbox thread I see Jacque's and 
> Charle's comments. 5 secs seems a little long.. so if we use the algorithm 
> "We want to tell users what is up or dim content options from remote servers 
> in 3 seconds"  (and FTP is not in the cards) we get: 
> 
> tsNetSetTimeouts 60, 3000, 3000 , , 3, 12000
> 
> This translates "you must have a 96kbps connection or else…"  right?
> 
> FYI the dictionary does not declare units for the pLowSpeedTime, it should… 
> I've assumed integers = seconds and not milliseconds for param 5.


I will get that fixed in the dictionary in the next version, thanks for letting 
me know.

tsNetSetTimeouts uses the last two parameters to determine if a connection 
should be dropped if the “average” speed of the transfer falls below the values 
set.

To use your example, if you want to ensure that the average speed of the 
transfer does not fall below 96kbps, calculating the average speed over a 3 
second period, you would specify a value of 3 for the second last parameter and 
96000 (96kbps x 1000 bytes per kB) for the last parameter to tsNetSetTimeouts.


> Second  (dumb) question: how do we trap for the timeout? we keep checking the 
> tsNetStatusCallback on a loop? and if and when we see timeout we inform the 
> user? But we need a connectionID, so how do we extract a connectionID from 
> put/get/set/ http urls? where we are targeting  browser widget on a card. Or 
> a mobilePlayer?


If you are using a standard synchronous libUrl request (put URL, post x to URL, 
etc...) then the request will abort as soon as the connection speed falls below 
the threshold specified and an error will be stored in the result.

For asynchronous tsNet requests, the callback message will be sent with an 
error code indicating the failure.

Hope that helps,

Cheers.

Charles



___
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

Re: libUrl tsNet and socketTimeoutInterval

2017-11-22 Thread Charles Warwick via use-livecode
Hi Ralph,

You are correct, as tsNet does not use the standard LiveCode sockets, it does 
not pay attention to the socketTimeoutInterval.

However, rather than disabling tsNet, you can resolve any app hangs related to 
socket timeouts by using the tsNetSetTimeouts command which allows you to 
control how long the external will wait before considering a connection lost.

Have a look at the following bug report which is about a similar issue:

http://quality.livecode.com/show_bug.cgi?id=20627

Effectively the last two parameters to that command allow you to set a minimum 
amount of data that must be transferred across a connection within a specified 
period of time to consider a connection still active.

Having said that, when tsNet is disabled, libUrl should continue to pay 
attention to the socketTimeoutInterval property.

I have just done quick test on LC8.2.0dp2 and if I set the 
socketTimeoutInterval before making a “put URL xxx” call to a script that 
deliberately doesn’t respond in time, the request times out after the time 
specified by the socketTimeoutInterval call and returns a result of “socket 
timeout”.

Regards,

Charles


> On 23 Nov 2017, at 6:27 am, Ralph DiMola via use-livecode 
>  wrote:
> 
> libURL now using tsNet is a great addition to v8 but it seems to have broken 
> my code without warning unless I missed this warning in the release notes. I 
> seems that when tsNet was included in v8 the property socketTimeoutInterval 
> does nothing when doing ==> put url("https://"&":") into tWebData 
> <==. This explains a few reported app hangs. In the IDE tried ==> dispatch 
> "revUnloadLibrary" to stack "tsNetLibURL" <== but socketTimeoutInterval still 
> does nothing. Ran the stack in 7.1.4 and socketTimeoutInterval works as 
> expected. It's my understanding that when tsNet is unloaded libUrl falls back 
> to using sockets and the socketTimeoutInterval property should be respected.
> 
> I'm using 8.1.7
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> 
> ___
> 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
> 


___
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

Re: When do you need tsNet-x86_64 ?

2017-11-16 Thread Charles Warwick via use-livecode
Hi Tiemo,

You only need the tsNet inclusion for building 64bit Mac standalones.

The tsNet-x86_64 inclusion is currently only for the LC FileMaker plugin.

Regards,

Charles

> On 16 Nov 2017, at 8:15 pm, Tiemo Hollmann TB via use-livecode 
>  wrote:
> 
> Hi,
> 
> up to now I have manually selected the inclusion tsNet. Now I want to build
> 64Bit standalones for Mac. Do I now have to select the tsNet-x86_64
> inclusion instead? While running still 32 Bit on Windows, do I now have to
> select both tsNet inclusions and each standalone will pick the right tsNet,
> or do I have to assign the correct one for windows / Mac - but how?
> 
> Or am I completely on the wrong lane with tsNet-x86_64?
> 
> 
> 
> Thanks for any insight
> 
> Tiemo
> 
> 
> 
> 
> 
> 
> 
> ___
> 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
> 


___
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


Re: Testing Bandwidth with new TSNet Functions

2017-11-16 Thread Charles Warwick via use-livecode
Have a look in the dictionary at the tsNetSetTimeouts command.

In particular, the last two parameters allow you to define a minimum transfer 
speed so that if a transfer falls below that speed, tsNet will abort the 
connection.

For example, if you issue the following command:

tsNetSetTimeouts 30, 0, 30, 6, 30, 1

Then tsNet will abort any connection that is transferring at a rate slower than 
1 bytes per 30 seconds.

Cheers,

Charles

> On 16 Nov 2017, at 5:28 am, Ralph DiMola via use-livecode 
>  wrote:
> 
> Sannyasin,
> 
> This is what I'm going to try to deal with the moving in/out of services 
> issues. I have not done this yet but will try in the next week or 2.
> 
> 1) Talk to my web service and see if there is a reasonably fast connection.
> 2) If so then use asynchronous TSNet to download data in the background with 
> a callback.
> 3) Set a timer to keep checking the latency of the web service every second 
> or so until the data transfer is complete.
> 4) Cancel the timer in the callback when TSNet completes.
> 5) If at any time during the TSNet transfer the ping to the server is too 
> slow then cancel the transfer and notify the user the data connection is 
> either too slow or nonexistent at this time.
> 
> That's all I got
> 
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net
> 
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of Sannyasin Brahmanathaswami via use-livecode
> Sent: Wednesday, November 15, 2017 12:52 PM
> To: How LiveCode
> Cc: Sannyasin Brahmanathaswami
> Subject: Testing Bandwidth with new TSNet Functions
> 
> Someone suggested we could test bandwidth by getting the milliseconds before 
> calling a ping.txt file on our server (contains one word "true") and then 
> check the milliseconds after getting the result and we might use this to 
> determine if the bandwidth was sufficient for streaming content from the web 
> server.
> 
> Some very, very big "million dollar" apps are surprisingly "brutal" about 
> this… Spotify, for example, even if I am on 3G and able to get a web page on 
> Safari in my iPhone 7… will simply throw up It's broken connection icon 
> (pretty ugly, whole screen display) and not even bother to "say anything" to 
> the user.
> 
> FlipBoard, the "super access to all the publications in some large universe" 
> simply fails on startup if you are offline when you boot, they don't even 
> give the user the courtesy of a notification that they are off line.  OK well 
> I take that back.. not at least they tell you to turn off airplane mode… but 
> if on super low 3G  the app just becomes non-functional stopping cold on the 
> splash screen, again, not even bothering to tell the user anything.
> 
> Our SivaSiva app has a mix of content resident in the app and content we call 
> dynamically, so I need a more robust/gracefulway to deal with users walking 
> from 4 bars strong LTE at the coffee shop to 1 blip 3G connection as they 
> walk down the street to the bus, and then back up with 5bars Wi-Fi at home or 
> office.
> 
> Currently my ping-the-server method is to see if I can get the ping file, but 
> fetching a ping.txt with only 4 chars data, tends to work, even in low 
> bandwidth situations, this "fools" the app into thinking it has a connection, 
> but if they try to then look at a video in the browser widget from YouTube, 
> or load an image heavy page (our blog) or call some painting/artwork into an 
> image object… the browser widget  just "goes white"  -- (a bug IMHO), because 
> I can/do put up a loading gif on the card, but the browser widget takes over 
> and "hangs on blank" waiting for the GET connection go pull enough data to 
> start rendering and I have no way to tell the user their bandwidth is too 
> low. So this just make the app look like it failed or is "super slow."
> 
> That's the back story: I know TS Net has some functions along these lines, 
> before I dive in from ground zero and flail around this issue, can anyone 
> share what they are using/doing to deal with variable bandwidth? What is 
> working for you and a few snippets would be greatly appreciated.
> 
> Brahmanathaswami
> www.himalayanacademy.com Get the SivaSiva 
> App today (for iPhone and iPad)
> https://itunes.apple.com/us/app/sivasiva/id1271260502?mt=8
> (Android Pending HQ's Solution to some Engineering Issues)
> 
> 
> ___
> 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
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> 

Re: Socket help needed for API

2017-10-30 Thread Charles Warwick via use-livecode
Hi Richard,

I have an LC external under development that supports websockets that could 
potentially help you.  Feel free to contact me off-list if you would like to 
try it out.

Regards,

Charles

> On 30 Oct 2017, at 9:37 am, Monte Goulding via use-livecode 
>  wrote:
> 
> Hi Richard
> 
> LiveCode does not currently have websocket support. As this has come up 
> recently in a number of areas I had a quick look at the spec 
> (https://tools.ietf.org/html/rfc6455 ). 
> It looks relatively feasible to implement on top of our current socket 
> support in LiveCode script. Possibly as part of libURL or a separate library.
> 
> Cheers
> 
> Monte
> 
>> On 29 Oct 2017, at 10:49 pm, Richard Miller via use-livecode 
>>  wrote:
>> 
>> I have been using LC to access an API through conventional means, but that 
>> site has now changed to a socket protocol. I have tried various methods, but 
>> just can’t get it to work.
>> 
>> I would appreciate it if someone familiar with sockets could take a look and 
>> show me how to do this. I only need to know how to establish a connection 
>> and receive data. I can take it from there.
>> 
>> The information I am looking to receive is what is produced through this now 
>> deprecated API. It is a list of all of the digital tokens being traded at 
>> this site. (Note: you may have to send this link a few times in order to get 
>> a response. The site is often overloaded.)
>> 
>>put https://api.etherdelta.com/returnTicker
>> 
>> I want to receive the same information, but using the new socket-based API 
>> shown here.
>> 
>> https://github.com/etherdelta/etherdelta.github.io/blob/master/docs/API.md
>> https://github.com/etherdelta/etherdelta.github.io/tree/master/bots
>> 
>> Thank you very much for help with this.
>> Richard Miller
>> 
>> ___
>> 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
> 
> ___
> 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


___
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

Re: [tsNet] tsNetSmtpSync

2017-09-15 Thread Charles Warwick via use-livecode

Hi Theirry,


On 15/09/2017 7:08 PM, Thierry Douez via use-livecode wrote:

​I guess both methods are safe?
or is there some advantages with one or the other?

I'm using it within a Livecode Mail Composer.
Based on an export of my server DB, I'm scanning some address,
build dynamically the html-email and send one by one all emails.
​


Both are safe.  Generally, if you are going to be making multiple 
connections to the same server (in this case, sending a number of 
e-mails) fairly quickly, then allowing tsNet to reuse an existing 
SSL/TLS connection to the server will be quicker (it doesn't have to 
establish the SSL connection each time).


Regards,

Charles


___
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

Re: [tsNet] tsNetSmtpSync

2017-09-15 Thread Charles Warwick via use-livecode

Hi Thierry,

On 15/09/2017 6:31 PM, Thierry Douez via use-livecode wrote:

Hi all,

I've worked hard with tsNetSmtpSync() these last days,
on macOS Sierra with the latest LC 8.1.6
and have 2 questions which bothers me:

- from time to time (no recipe yet), I've got an error when executing it.
Executing it again (same code and context) and all is fine then.


What is the error message that you get?


- about the ResponseHeaders out parameter:
tsNet will try re-use an existing connection if there is one available, 
so this first example:

Sometimes I get:

220-xxx..net ESMTP Exim 4.89 #1 Thu, 14 Sep 2017 14:17:38 +0200
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
250-xxx..net Hello z [99.33.77.88]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP
220 TLS go ahead
250-xxx..net Hello pommeDesFouets [99.33.77.88]
250-SIZE 52428800
250-8BITMIME
250-PIPELINING
250-AUTH PLAIN LOGIN
250 HELP
334 VXNlfg5hbWU6
334 UGFzc3sdfcmQ6
235 Authentication succeeded
250 OK
250 Accepted
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=1dsT5O-002hrt-TA
Indicates that there was no existing SMTP connection to the server, so 
it needed to establish a new connection.


Where in the following example:

or this:

250 OK
250 Accepted
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=1dsSmD-003WQr-2l
This indicates that tsNet found an existing SMTP connection to the 
server you are connecting to, so could just send the message across the 
already open connection.


You can add the "no_reuse" element with a value of true to the settings 
array (last parameter to tsNetSmtpSync) if you want to establish a fresh 
connection for each e-mail that is sent rather than allowing tsNet to 
reuse an existing connection.


Hope that helps,

Regards,

Charles



In both cases, the email is sent and received correctly.

Thanks for some hints.

Thierry





___
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


Re: TSNet error 6

2017-09-05 Thread Charles Warwick via use-livecode

Hi Jacque,

Any of those error codes (6, 7 or 35) are reasonable if you are 
operating in an area with a really poor connection.


When you are operating on a public wifi, it could have a lot to do with 
how the wifi is configured, as Bob mentioned below.  How these are 
configured can vary greatly.


Depending on how far you want to go with testing, you could try see if 
your app can communicate with other sites when at these coffee shops.  
Does it only have trouble with HTTPS sites, or just certain sites?  If 
you browse to a site first with Chrome, does your app then work 
afterwards?  Does it have trouble if you try connect via the IP address 
rather than the hostname?


Cheers,

Charles


On 6/09/2017 6:37 AM, J. Landman Gay via use-livecode wrote:
Okay, so three of us have been running around for a couple of days 
trying to find "bad" internet connections. Sometimes we walk to the 
limits of our router until we barely get a connection, and we get curl 
error 35. At some coffee shops with a solid connection we get error 6, 
once error 7. Sometimes Slack works, sometimes it doesn't. Sometimes 
we don't have any problems at all on public wifi.


I think this is out of our control.

On 9/5/17 11:08 AM, Bob Sneidar via use-livecode wrote:
That is interesting. Coffe Shops/Public Wifi typically use a proxy 
server and that may be what is restricting your DNS resolution. And 
yeah it could definitely be a router issue as well. Sometimes I have 
to reboot the router at work. No rhyme or reason, it just stops 
passing traffic and I have to reset it. Wireless is black magic 
voodoo anyways.


Bob S


On Sep 2, 2017, at 06:46 , Ralph DiMola via use-livecode 
 wrote:


In today's episode, the user was in a coffee house using the free 
wifi (it was one of my testers, there on purpose for testing). The 
app could not resolve the host though the connection would have been 
constant.
When he tests from his own home everything works, as it does for all 
of us on the team.


We're wondering if https has anything to do with it. He could 
connect to anything with Chrome but both my app and Slack would not 
work using https. Could that be a factor?


We need to keep testing to see if https is really the cause, we're 
not quite sure yet.



___
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







___
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

Re: TSNet error 6

2017-09-03 Thread Charles Warwick via use-livecode
That seems to be a Linux specific library issue from what I can tell

Are you having issues on just one Android device?

Regards,

Charles

On 4 Sep 2017 at 05:58:17 AEST, J. Landman Gay via use-livecode 
 wrote:

On 9/3/17 2:45 PM, J. Landman Gay via use-livecode wrote:
> On 9/2/17 8:39 AM, Ralph DiMola wrote:
>> I would zero in on the https thing.
> > I found this on stackOverflow > 
> > :
> >  > > > ***
> I found that CURL can decide to use IPv6, in which case it tries to > resolve 
> but doesn't get an IPv6 answer (or something to that effect) and > times out.
> > You can try the command line switch -4 to test this out.
> > In PHP, you can configure this line by setting this:
> > curl_setopt($_h, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
> ***
> > Several people in that thread report the problem started suddenly in > 
> > March of this year. Could this be related?
> > Charles W: does TSNet add an IPv4 option to https requests?
> 

And more: 

A regression bug in Ubuntu in a March release which has been fixed, but not 
every server has been updated. I'm not sure there's much us peons can do about 
that, but hoping Charles knows.

-- Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
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


___
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


Re: is IMAP or POP3 supported with tsNet?

2017-08-24 Thread Charles Warwick via use-livecode


On 24/08/2017 6:40 AM, Monte Goulding via use-livecode wrote:

On 24 Aug 2017, at 1:06 am, Stephen MacLean via use-livecode 
 wrote:

Don’t think it is, based on what’s in the dictionary, but thought I would ask: 
is IMAP or POP3 supported with tsNet?

I know CURL does, but don’t know if it’s been added to tsNet.

Short answer yes. Long answer Charles is going to write some docs or a demo to 
explain how to do it. Not sure on the ETA of that.


IMAP and POP3 support in tsNet under Linux is only available in tsNet 
1.3.0+ which will be bundled with the next LC release.


All other platforms have had support for those protocols for a while.  I 
hope to have some documentation available in the next two weeks.


Regards,

Charles


___
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

Re: App Rejected: IPv6 network?

2017-08-10 Thread Charles Warwick via use-livecode

Hi Dan,

On 11/08/2017 7:43 AM, Dan Friedman via use-livecode wrote:

To begin, the original purpose of this thread was to discover why the app was 
rejected by Apple.  It turns out that my app disables tsNet (because I have had 
tons of trouble with it) and that’s why the first stack was successful and the 
second one failed.  Simply not disabling tsNet resolved the problem and the app 
was the approved and released in the app store.

Can you provide any more information about the problems you have been 
having with tsNet?


If there is anything you can pass on, it would be greatly appreciated, 
so that I can work to resolve any of these issues.


Cheers,

Charles


___
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

Re: AW: load URL is broken in 8.1.4

2017-07-31 Thread Charles Warwick via use-livecode

Hi Tiemo,

My apologies if there was a regression due to tsNet in those particular 
versions.


Between tsNet 1.2.7 and tsNet 1.2.8, the only change to the Windows 
build was an update of the underlying curl library that tsNet uses.


While that does open the possibility for a regression, the underlying 
curl library remained the same between tsNet 1.2.8 and tsNet 1.2.9 
(which I believe you are not having the issue with).


Best Regards,

Charles


On 31/07/2017 10:15 PM, panagiotis merakos via use-livecode wrote:

Sorry, this part should be:

"So I would guess that tsNet 1.2.8 has caused this bug for you in 8.1.4,
which was fixed in tsNet 1.2.9 (included in LC 8.1.5)."

On Mon, Jul 31, 2017 at 1:14 PM, panagiotis merakos <
panos.mera...@livecode.com> wrote:


Hi Tiemo,

The "load url" call does use tsNet if you are on Indy or Business. In fact
every network-related operation does use tsNet on Indy and Business.
Moreover, the tsNet external was updated in LiveCode 8.1.4 rc2 (to fix bug
http://quality.livecode.com/show_bug.cgi?id=19026), so it quite possible
that this update has caused the regression you experienced in 8.1.4 stable.

For reference, those are the tsNet versions that are included in the LC
recent versions:

LC 8.1.4 rc-1 : tsNet 1.2.7
LC 8.1.4-rc-2 until 8.1.4 stable: tsNet 1.2.8
LC 8.1.5 stable: tsNet 1.2.9
LC 8.1.6 rc-1 until 8.1.6 stable (to be released very soon): tsNet 1.2.10

When a LC release includes a new tsNet version, this is mentioned in the
release email.

So I would guess that tsNet 1.2.9 has caused this bug for you in 8.1.4,
which was fixed in tsNet 1.2.10 (included in LC 8.1.5).

Best regards,
Panos
--



On Mon, Jul 31, 2017 at 12:55 PM, Tiemo Hollmann TB via use-livecode <
use-livecode@lists.runrev.com> wrote:


Hi Mark,
thank you for your explanations. What I can understand are the
regressions switching from 6 to 7/8, because of widely new underlying
architecture and components. That was a huge step. There I had a lot of
sympathy. What is much more harder to understand and acceptable are the
regressions within version 8. I would think that there is not such a
general exchange of components under the hood from 8.1.4rc1 to 8.1.4, which
would make a total test of every detail necessary. My first idea was a bug
in tsNet.dll, but this "load URL" bug is not caused by the different
versions of tsnet, but definitively by LC 8.1.4.
Tiemo


-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im
Auftrag von Mark Waddingham via use-livecode
Gesendet: Montag, 31. Juli 2017 13:41
An: How to use LiveCode 
Cc: Mark Waddingham 
Betreff: Re: AW: load URL is broken in 8.1.4

I don't think there is anyway we can deny that the transition from 6.x to
7.x caused a lot of regressions.

This is why we have a strict policy of handling maintenance releases now
- i.e. we work very hard to ensure each maintenance version is strictly
better than before.

I know of a number of users who have had similar difficulties moving from
6 straight to 8 - however, barring the occasional error (e.g. The backdrop
fiasco and the load URL one you mention directly) 8.1.(x+1) has had less
regressions relative to 6 - and no regressions relative to 8.1.x.

Also (as far as we can) regressions relative to older versions get very
high priority in our bug fixing queue.

So things might not yet be perfect but I'd hope that everyone can see
that we've made great strides (indeed, we've made good progress on fixing
issues which have been around a lot longer recently - even back to the very
early days of the MetaCard engine).

No-one likes encountering regressions - however in a system as complex
and broad as ours they are often unavoidable.

Every one sees a different view of the elephant so to speak - and we try
to act as quickly as we can when issues are reported (usually seeeing them
fixed in the next maintenance release).

Warmest Regards,

Mark.

Sent from my iPhone


On 31 Jul 2017, at 12:27, Tiemo Hollmann TB via use-livecode <

use-livecode@lists.runrev.com> wrote:

I forgot my final question: Have you made similar experiences or is it
only me and how do you handle this permanent hazard of regression bugs?
Tiemo

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im
Auftrag von Tiemo Hollmann TB via use-livecode
Gesendet: Montag, 31. Juli 2017 11:16
An: LiveCode User Liste senden 
Cc: Tiemo Hollmann TB 
Betreff: load URL is broken in 8.1.4

Hello,

For my automatic update mechanism I am downloading a zip file from a
web server, extracting the zip file and starting the downloaded update.

I am doing this since years, without having changed anything in my
code. Now in 8.1.4, Windows 10 this load URL downloads a
"broken/corrupted" empty zip file, which breaks my whole update
process. In 8.1.4 rc1 this still has worked and in 

Re: Finding errors in a standalone

2017-07-13 Thread Charles Warwick via use-livecode

On 14/07/2017 1:40 PM, J. Landman Gay via use-livecode wrote:

On 7/13/17 7:59 PM, Alex Tweedly via use-livecode wrote:


Yeah - it's the equivalent of that (but writing to a log file) that 
makes me think it's tsNetInit that's the problem. But I don't know 
what to do next - Internet is included (manually, and hopefully also 
by search for inclusions), I'm using Business edition, so why would 
tsNetInit fail ?


Being ignorant of almost everything about internet connection details, 
I've never called tsNetInit. I just include the internet library in my 
standalone and it works. I'm gussing it initializes itself when the 
library loads. What happens if you remove that command?


Is there any chance that the tsNet library was unloaded (by calling: 
dispatch "revUnloadLibrary" to stack "tsNetLibURL") prior to creating 
the standalone?


If it has been unloaded, then you would need to specifically include the 
tsNet inclusion to be able to use tsNet commands directly.


If the tsNet is actually loaded, then including the Internet library 
will automatically include tsNet as well (as tsNetInit will 
automatically be called on startup of revLibURL).


Cheers,

Charles

___
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


Re: [ANN] Release 8.1.5 -- tsneterr

2017-07-13 Thread Charles Warwick via use-livecode

Hi Dan,

The resetAll command is very destructive, in that it closes all 
currently open connections.  In certain circumstances it has been 
required when using the traditional libUrl library to work around 
network errors and in order to maintain feature parity, it does also 
work with tsNet.


However I generally would not recommend using it with tsNet as there are 
other mechanisms available in tsNet to enable it to handle network 
problems more gracefully.


I recommend taking a look at the tsNetSetTimeouts function that is 
available in tsNet 1.2.10 (which is included in LC 8.1.5).  In 
particular, have a look at the pLowSpeedTime and pLowSpeedLimit 
parameters to that function.  They allow you to set a minimum number of 
bytes that must be sent/received within a specified time period for the 
connection to be considered acceptable by tsNet. If the speed of 
transfer falls below that amount, the connection will be timed out 
returning control to your script.


This should prevent connections from stalling and not returning - which 
is generally where the use of resetAll comes into play.


If you are using apps within a mobile environment where network 
connectivity can come and go frequently, it may also be worth setting 
"tsNetLibUrlReuseConnection false" at the start of your application.


Having said all of that, it is still possible to use resetAll, though 
some care must be taken.  With tsNet, it briefly disables the external 
and then re-enables it.  My guess is that another handler is trying to 
process a URL request while the resetAll is being performed.


The easiest way to see if tsNet is in use by libUrl is:

putthebehaviorofstack"revLibUrl"intotLibUrlDriver
if tLibUrlDriver isemptythen
answer"tsNet is disabled"
else
answer"tsNet in use"
end if

Best Regards,

Charles

On 13/07/2017 4:34 AM, Dan Friedman via use-livecode wrote:

Charles,

Yes, I do have resetAll in my scripts.   I use it when a communications error 
has occurred as a way to reset and try again.  If tsNet is in play, I gather I 
should not call resetAll?  If not, is there something else I should be doing?  
Also, is there a way (via a property) to determine if tsNet or libURL is 
handling the network?

Thank you!
  
-Dan
  


On 7/12/17, 9:38 AM, "use-livecode on behalf of 
use-livecode-requ...@lists.runrev.com"  wrote:

 Hi Dan,
 
 The error message "Not initialised" (the spelling is correct depending

 on where you live ;-) ) indicates that the tsNet external isn't running.
 
 If you are using libUrl which I am guessing you are, tsNet is

 initialised on startup, so this would indicate that it has either been
 shut down by calling tsNetClose directly, or by a call to the libUrl
 "resetAll" or "libUrlCancel" commands (which temporarily shut down the
 external and start it back up to clear all connections).
 
 I have seen code posted on the list in the past which invoked "resetAll"

 to deal with issues in older versions of libUrl.  Do you use these
 commands at all in your project?
 
 Regards,
 
 Charles


___
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



___
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


Re: [ANN] Release 8.1.5 -- tsneterr

2017-07-12 Thread Charles Warwick via use-livecode

Hi Dan,

The error message "Not initialised" (the spelling is correct depending 
on where you live ;-) ) indicates that the tsNet external isn't running.


If you are using libUrl which I am guessing you are, tsNet is 
initialised on startup, so this would indicate that it has either been 
shut down by calling tsNetClose directly, or by a call to the libUrl 
"resetAll" or "libUrlCancel" commands (which temporarily shut down the 
external and start it back up to clear all connections).


I have seen code posted on the list in the past which invoked "resetAll" 
to deal with issues in older versions of libUrl.  Do you use these 
commands at all in your project?


Regards,

Charles


On 12/07/2017 3:33 AM, Dan Friedman via use-livecode wrote:

I am porting a large project from LC 7 to 8.1.5.  Occasionally, I get this 
error when accessing the internet:  “tsneterr: Not initialised” (misspelled, by 
the way).   It works fine for a while, then it just fails.  And, once it fails 
you have to completely restart.  Sometimes LC even crashes!

It seems to be happening when one network connection isn’t finished and it 
tries to start another one.   I did not have this problem in LC 7 using libURL. 
 So, I’m pretty confident it’s something with tsNet.

If it’s because tsNet calls are crashing into each other, and If all calls [by 
default] are blocking, how could one connection be started before the previous 
one is completed?

I had this problem with previous versions of 8.1, but I was hoping it would be 
fixed in 8.1.5.

Anyone have any insight?   I would very much like to move forward with tsNet, 
but if this isn’t resolved, I can’t.  Is it possible to continue with 8.1.5, 
and still use the old libURL?


-Dan

___
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



___
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

Re: Server Installation

2017-06-18 Thread Charles Warwick via use-livecode

On 18/06/2017 7:23 AM, Richard Gaskin via use-livecode wrote:

Malte wrote:

> Ok, I want this. Who does it? I am throwing $500 in the pot…
> Someone also willing to write a .bat for Windows and maybe make the
> Linux one work on Mac OS also???

I'd do an initial version for that which would handle Ubuntu 14.04 and 
Ubuntu 16.04, under MIT so everyone can extend it for Mac and Windows 
if they need.


Do we want VPS, or should we consider versions for shared hosts? There 
are subtle differences between shared hosts that can make them more 
challenging, but the upside is they have pro admins hardening and 
monitoring so they're a better option for newcomers to get started.


I could also write a script to harden a VPS, but doing it well 
requires using the script carefully, after setting up shared SSH keys, 
because I prefer to completely turn off password login on any system 
where I can
In case it may help... you can take a look at a Docker image I wrote 
that builds Livecode server with Apache in a base Ubuntu environment.


Specifically the Dockerfile (which builds the Docker image) is 
essentially just set of bash commands that builds everything that is 
needed.  The Apache config file used for the Docker image is also there.


https://github.com/techstrategies/docker-livecode

For those who know what Docker is (or want to try use it), the Docker 
image is available on hub.docker.com:


https://hub.docker.com/r/techstrategies/livecode/

Cheers,

Charles

___
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

Re: asynchronous sockets

2017-06-15 Thread Charles Warwick via use-livecode

On 16/06/2017 2:39 PM, Monte Goulding via use-livecode wrote:

On 16 Jun 2017, at 2:22 pm, Tom Glod via use-livecode 
 wrote:

I'm relieved to hear that I think I misunderstood Todd's blog... maybe
his was a purely volume related bottleneck and not the library he was using.

Ah, yes his is a use case that had lots of requests running in parallel and 
from the looks of things to the same API which libURL doesn’t cope with (would 
need a redesign to have request IDs rather than using the URL as the ID). I’m 
not sure if he needed asynchronous put, post or delete but that’s also 
something libURL doesn’t do. So the sockets are fine it’s just libURL 
implementation that would need some help to meet Todd’s requirements.
In Todd's application there was a requirement for asynchronous HTTP POST 
requests which aren't supported in libURL.


Without tsNet, POST requests need to be sent in series "post tData 
to url xxx", wait for the response and then issue the next post.   From 
memory, his application sends over 1000 POSTs to perform a sync and 
running them "one at a time" really slowed the process down.


By using the asynchronous POST capabilities of tsNet, a lot of these 
requests could be sent without waiting for others to complete.  This is 
what provided the dramatic performance improvement he saw.


Regards,

Charles


Cheers

Monte
___
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



___
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

Re: using tsNet external

2017-06-02 Thread Charles Warwick via use-livecode

Hi Terry,

On 24/05/2017 11:55 AM, Terry Judd via use-livecode wrote:

Couple of questions about the tsNet external...

# if I’m just using get or post url (i.e. no special tsNet commands) do I still 
need to call tsNetInit?
No.  tsNetInit is automatically called on startup as part of libUrl 
initialisation.



# what is the default timeout for a synchronous get or post url call, and how 
do I change it?
tsNet has a number of different settings related to determining if a 
connection has timed out.  At the moment, these cannot be changed.


Having said that, I am in the process of adding the ability to change 
these values for the next release.


Cheers,

Charles

TIA,

Terry...
___
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



___
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

Re: urgent iOS internet issue (url request timeout setting?)

2017-06-01 Thread Charles Warwick via use-livecode

Hi Terry,

I think this is the same issue as has been reported here that I am 
looking into:


http://quality.livecode.com/show_bug.cgi?id=19656

At this point in time, issuing "tsNetLibUrlReuseConnection false" is the 
best solution, as this will stop tsNet from trying to re-use an existing 
open connection to a server.


If you are using tsNet functions directly, the equivalent option can be 
set by using tSettings["no_reuse"] to true and passing that to the 
function.  For example:


local tHeaders, tRecvHeaders, tResult, tBytes, tSettings
put true into tSettings["no_reuse"]
put tsNetGetSync("http://www.livecode.com;, tHeaders, tRecvHeaders, 
tResult, tBytes, tSettings) into tData


Best Regards,

Charles



On 1/06/2017 1:24 PM, Terry Judd via use-livecode wrote:

OK, I think I have a workaround although I’m not sure whether it is a good 
solution or not.

If I include the line...

tsNetLibUrlReuseConnection false

...in my preopenstack handler then the delay/hang seems to disappear – i.e. I 
get an almost immediate response if the url isn’t available. I’m not at all 
sure what this achieves but it seems that a new connection that can’t connect 
doesn’t experience the same problem as an existing connection that was 
previously successful.

Anyway, panic averted for now but any insights into the best way to deal with 
this stuff would be appreciated.

Terry...



On 1/06/2017 11:44 am, "use-livecode on behalf of Terry Judd via use-livecode" 
 wrote:

 OK – I have a bit of a serious issue on iOS where if I lose wifi 
connectivity the first attempt to get data from a url causes problems.
 
 I’m attempting to upload a file to Dropbox (that stuff all works fine) and I do an initial test to see whether the device is online (by trying to access a url). If it is I proceed with the upload, if not I just save a local copy of the file. Anyway, the first time I do the test the request seems to take forever (minutes?) – which I don’t have (I need the request to be completed within a few seconds). The second time around is ok though.
 
 Any ideas on how I prevent this initial ‘hang’. Is it possible to set a shorter timeout or something?
 
 Terry...

 ___
 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
 


___
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



___
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

Re: FTP from iOS but getting tsneterr: (67) Access denied: 530

2017-05-25 Thread Charles Warwick via use-livecode
Hi John,

Certain characters in usernames and passwords need to be URL encoded if you 
want to include them in a URL string.  The @ character is one of them.

Try something like his:

put urlencode("autoim...@jdoe.on-rev.com") into tUser 
put urlencode("x") into tPass
put the last image into URL 
("ftp://"&":"&"@jdoe.on-rev.com/autoimage/images/newimage.jpg”)

Cheers,

Charles

-- Sent from my iPhone

On 26 May 2017 at 08:32:55 AEST, JOHN PATTEN via use-livecode 
 wrote:

Hi All,

I’m trying to ftp and image from the photo gallery on iOS to my on-rev account. 
 I’m using the example:

on mouseUp
mobilepickphoto “library"
--upload to FTP
put the last image into url 
("ftp://autoim...@jdoe.on-rev.com:xx...@jdoe.on-rev.com/autoimage/images/newimage.jpg”)
--Informs of successful or unsuccessful upload
if the result is not empty then
answer "url put failed:" && the result
else
answer "success!”
end if
end mouseUp
——

It is throwing and an error, tsnetterr:(67) Access Denied: 530.

I can use Fetch (a mac FTP client) just fine with the same credentials and 
upload an image with no problem. I don’t even have to give Fetch the full ftp 
directory, just the host.

What am I missing?

Thank you!

John Patten
SUSD
___
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


___
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

Re: Calling a livecode executable -ui from LC server and get back a result.

2017-05-05 Thread Charles Warwick via use-livecode

Hi Malte,

If you are able to use the commercial version of LC server, the tsNet 
external is supported which provides equivalent functionality to libUrl.


Regards,

Charles


On 5/05/2017 8:48 PM, Malte Brill via use-livecode wrote:

Thanks Dan, but that is not what I am after…

I have a server side liveCode application, which needs to talk to a couple of 
webservices from time to time. While this works nicely on the desktop, it does 
not do so on Server, as Server lacks some libURL functionality. First 
workaround was to shell out to cURL. This works nicely on Mac and Linux 
servers, but forever reason fails under Windows Server, which I need to 
support. So the next thought was to call a liveCode executable -ui when needed, 
but I do not get a result back there. I will not want to have a liveCode 
standalone running 24/7 on a server machine. I guess the easiest way out is to 
simply kill off the idea to treat liveCode server as a replacement for PHP and 
just bite the bullet and build everything in PHP instead. Or start an 
initiative to get libURL ported to server. I already talked to the guys in 
Scottland to see if this would be feasible, but it would cost a bit more than I 
could afford alone. I might just go with having the single command implemented 
I would need for the project (libURLLastRHHeaders), which then would also lift 
the requirements for having to use cURL or any other helper app in my case, but 
I am not quite sure if that makes sense…

Would anybody else like to see libURL feature parity between Desktop and Server 
engines and if so be willing to set up a fundraiser with me for this?

Cheers,

Malte


You can communicate between server and desktop using sockets. Chatrev is a
good example of this
http://www.bjoernke.com/index.irev?target=chatrev


___
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




___
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

Re: tsNet docs?

2017-04-04 Thread Charles Warwick via use-livecode
Hi Richard,

Are you using ftp:// or ftps:// at the start of the URL?  It should be ftp:// 
even for FTPS connections.

Thanks,

Charles

-- Sent from my iPhone

On 5 Apr 2017 at 08:20:05 AEST, Richard Gaskin via use-livecode 
 wrote:

Charles Warwick wrote:

 > Hi Richard,
 >
 > Do you only experience these hangs when you try to upload to folders
 > that don't exist?

With SFTP, yes.

With FTPS I'm now seeing an error 64: "Requested SSL level failed returned from 
server", with or without an existing path.


 > I have identified a bug related to that which should be fixed in the
 > next version.

Excellent. Thanks.  Looking forward to that build.

--   Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  
  ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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


___
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


Re: tsNet docs?

2017-04-04 Thread Charles Warwick via use-livecode
Hi Richard,

Do you only experience these hangs when you try to upload to folders that don't 
exist?

I have identified a bug related to that which should be fixed in the next 
version.

Thanks,

Charles

On 5 Apr 2017 at 06:50:29 AEST, Richard Gaskin via use-livecode 
 wrote:

Charles wrote:

 > Just briefly though, tsNet also provides the feature to automatically
 > create missing directories when uploading a file.  If you look in the
 > dictionary for the tsNet commands, you should be able to see a
 > command to turned that feature off if you wish to.

Thanks - found it:  tsNetCreateMissingDirs

Unfortunately, even after setting that to true if I use a path that includes 
folders that don't yet exist it hangs. :(



--   Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  
  ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
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


___
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


Re: tsNet docs?

2017-04-04 Thread Charles Warwick via use-livecode
Hi Richard,

Thanks for the bug report, I'll check that out soon.

Just briefly though, tsNet also provides the feature to automatically create 
missing directories when uploading a file.  If you look in the dictionary for 
the tsNet commands, you should be able to see a command to turned that feature 
off if you wish to.

Thanks,

Charles

-- Sent from my iPhone

On 5 Apr 2017 at 03:28:19 AEST, Richard Gaskin via use-livecode 
 wrote:

Hello Charles -

Since I wrote my earlier post v8.1.4rc1 has been released, so I tried there 
with better results for some things, and noted all of my findings with both v9 
and v8.1.4 for both SFTP and FTPS here:
http://quality.livecode.com/show_bug.cgi?id=19525

Question:  libURL has a VERY convenient feature in which if you're uploading to 
a path that includes a folder that doesn't yet exist, it'll create that folder 
for you.

If tsNet doesn't provide that, is there any better method for doing that than 
obtaining a list of directories for even folder level and explicitly creating 
one if not found?

I can write code for that, and probably cache results as I go to minimize the 
number of times I need to do that, but it would sure be more convenient to 
discover that there's some means of getting that libURL convenience in tsNet.

Thanks -

--   Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  
  ambassa...@fourthworld.comhttp://www.FourthWorld.com


Earlier I wrote:
 > Charles Warwick wrote:
 >
 >  > Hi Richard,
 >  >
 >  > I think I am noticing a potentially related bug when an invalid
 >  > path is used in the SFTP transfer - I am looking into it now.
 >  >
 >  > Can you confirm that you are using the complete path for the
 >  > destination path in the URL?  Unlike FTP, SFTP paths are not
 >  > relative to the user's home directory.
 >
 > I would love to, but back on my main machine here this morning I
 > downloaded a fresh copy of the sample stack from the URL I'd used before:
 > 
 >
 > ...and I'm back to the "Unlicensed" error. :(
 >
 > I'm running LC v9dp76 Indy on Ubuntu 14.04.
 >
 > --
 >   Richard Gaskin



___
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


___
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


Re: tsNet docs?

2017-04-04 Thread Charles Warwick via use-livecode

Hi Richard,

I think I am noticing a potentially related bug when an invalid path is 
used in the SFTP transfer - I am looking into it now.


Can you confirm that you are using the complete path for the destination 
path in the URL?  Unlike FTP, SFTP paths are not relative to the user's 
home directory.


For example, if a user's home directory is /home/bob and you want to 
upload a file "test.txt" to the /home/bob/uploaddir/ directory, the URL 
would need to look something like this:


sftp://my.sftp.server.host/home/bob/uploaddir/test.txt

Please file a bug report and I will get an updated version out for you 
to test and see if we can confirm this is the same issue.


Cheers,

Charles


On 3/04/2017 8:23 AM, Richard Gaskin via use-livecode wrote:

Charles Warwick wrote:

> Firstly my apologies on the lack of documentation, it is definitely
> on my todo list and I am working on some Livecode lessons for tsNet
> at the moment.

Looking forward to them - thanks.


> I have just double checked that stack and noticed that the call to
> tsNetUploadSync is using the wrong syntax (it changed at one point)
> which could be causing you issues.
>
> An updated version is now available at that same URL with the
> corrected the syntax for that call and another button so that there
> are now examples for both uploading via SFTP and FTPS.
>
> These should work correctly on Indy and I have confirmed that here.

Thanks.  I'm no longer getting the license error with either FTPS or 
SFTP, and indeed I was able to upload a file with FTPS so that much is 
good.


With SFTP, however, I'm getting weird results, something I've never 
seen before, like LC is in some sort of semi-hung state.


I fill in the relevant fields, click "SFTP Upload Example", but then I 
don't get anything in the Results field and as long as I care to wait 
my CPU monitor shows LC churning up about 23%, but there's no visible 
indication that anything's happening.


Hoping to explore the script to guess what might be happening, I found 
I could switch tool modes and right-click on the button, but when I 
select "Edit Script" in the popup button nothing happens.


At that point some things are unresponsive, others eventually become 
responsive after long delays, and -- weirdest of all - after I quit C 
it's still shown as a process in my process list.


This is on Ubuntu 14.04, with LC v9 DP6.

Any other info I can provide?  Should I file a formal bug report on this?




___
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


Re: tsNet docs?

2017-04-02 Thread Charles Warwick via use-livecode

Hi Richard,

Firstly my apologies on the lack of documentation, it is definitely on 
my todo list and I am working on some Livecode lessons for tsNet at the 
moment.


I have just double checked that stack and noticed that the call to 
tsNetUploadSync is using the wrong syntax (it changed at one point) 
which could be causing you issues.


An updated version is now available at that same URL with the corrected 
the syntax for that call and another button so that there are now 
examples for both uploading via SFTP and FTPS.


These should work correctly on Indy and I have confirmed that here.  Are 
you by any chance trying to use the tsNetUploadFileSync command instead 
of tsNetUploadSync?


If so, these are only supported in the business edition if you are 
trying to use SFTP.


Regards,

Charles


On 2/04/2017 10:54 AM, Richard Gaskin via use-livecode wrote:
I finally got around to playing with tsNet, but I can't find docs, 
just sparse Dict entries.


I'd like to test uploading a file via SFTP and also FTPS, synchronous 
preferred in this case.


After hunting around via Google I manage to turn up this stack from a 
blog post:
 



But when I run a modified version of the "SFTP Upload example" button 
I get an error complaining about it being unlicensed.


I'm using Indy, and I believe synchonrous upload vis SFTP is supported 
with Indy, no?


Anyone here have a concise example of synchronous uploading via tsNet?




___
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


Re: SFTP with .PPK file

2017-03-18 Thread Charles Warwick via use-livecode

Hi Bob,

tsNet calculates the public key from the private key, so you only need 
to pass the private key to the tsNet functions.


Cheers,

Charles


On 18/03/2017 4:00 AM, Bob Sneidar via use-livecode wrote:

Looks like it DOES need the public key after all. I thought that was the way 
SSH worked. I was surprised when you said TSNet doesn't need the public key.

Bob S



On Mar 17, 2017, at 06:36 , Stephen MacLean via use-livecode 
 wrote:

SSH public key authentication failed: Unable to extract public key from private 
key file: Unable to open private key file


___
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




___
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


Re: SFTP with .PPK file

2017-03-18 Thread Charles Warwick via use-livecode

Hi Steve,

Ahh... it's been a while since I wrote the SSH component of tsNet and 
I've been unfortunately relying on the documentation I wrote when 
checking your code!


tSettings["ssh_private_key"] must provide the "path" to the private key, 
not the contents of the private key (another documentation issue for me 
to fix!).


So your code should actually look like

on mouseUp
  local tHeaders, tResult, tSettings
  put “" into tSettings["username"]
  put "D:\private.ppk" into tSettings["ssh_private_key"]
  tsNetInit
  put tsNetGet("1", "sftp://secure..us/;, tHeaders, 
"transferComplete", tSettings) into tResult

end mouseUp

Hopefully that will get it working for you!

Cheers,

Charles

On 17/03/2017 11:36 PM, Stephen MacLean via use-livecode wrote:

Hi Charles,

Again, thank you for all your help!!

I made the change below, and indeed didn’t get the error any more. However, I 
still wasn’t getting anything returned.

I ran your debug stack along side it and got this:

Hostname in DNS cache was stale, zapped
   Trying xx.xx.xx.xx...
TCP_NODELAY set
Connected to secure.xx.us (xx.xx.xx.xx) port 22 (#3)
SSH MD5 fingerprint: 
SSH authentication methods available: publickey
Using SSH private key file '-BEGIN RSA PRIVATE KEY——

-END RSA PRIVATE KEY-
'
SSH public key authentication failed: Unable to extract public key from private 
key file: Unable to open private key file

Not sure about were to go from here… I redid the export of the .ppk in PuttyGen 
and still get the same thing. There is no password protecting the key.

Any further help would be greatly appreciated.

Best Regards,

Steve MacLean


On Mar 17, 2017, at 5:04 AM, Charles Warwick via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi Steve,

My apologies... there is a mistake in the documentation for tsNet which I only 
just noticed.

The array element for the SSH private key should be tSettings["ssh_private_key"], not 
tSettings["ssh_priv_key"].

So if you change the following line:

put tPrivKey into tSettings["ssh_priv_key"]

to:

put tPrivKey into tSettings["ssh_private_key"]

you should be right to go!

(I will get this fixed in the documentation for the next version)

Best Regards,

Charles


On 17/03/2017 6:31 PM, Charles Warwick via use-livecode wrote:

Hi Steve,

The tsNet command only requires the SSH private key, so that is ok.

I will test again here to make sure there is nothing else going on in LC 9.0 
DP6

Just to check though, I assume your private key does not require a passphrase?

Another thing to try is to download the following simple stack:

https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode

Run that stack at the same time as your own, and click "Start Debug" before you 
try make the SSH connection.

It should provide some additional debug information that may shed more light on 
what is actually happening.

Regards,

Charles


On 16/03/2017 10:24 PM, Stephen MacLean via use-livecode wrote:

Hi Charles,

One other thing… in looking at the .ppk file, it contains both “public lines”  and 
"private lines”. All I see in the ssh key file is private.

Not sure that make any difference, but thought I’d mention it.

Best,

Steve


On Mar 16, 2017, at 7:53 AM, Stephen MacLean via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi Charles,

Thank you so much for reply!

I converted the key file as you described, however, I’m still getting the error 
67 (authentication error) when running the script.

Any further help would be greatly appreciated.

Best,

Steve MacLean


On Mar 16, 2017, at 3:08 AM, Charles Warwick via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi Steve,

It looks like you are using a SSH private key in PuTTY format (.ppk).  tsNet 
requires it to be in OpenSSH format.

That is easy to fix though, you can convert the .ppk with PuttyGen.

To do this, open PuttyGen and load the .ppk file.  Then select "Conversions" -> 
"Export OpenSSH key".

Apart from that, just make sure that your call to tsNetGet includes the full 
path of the file you want to download.

Hope that helps,

Cheers,

Charles


On 16/03/2017 6:01 AM, Stephen MacLean via use-livecode wrote:

Well, still no luck in getting it to work, but getting closer…

I found a sample file linked to on livecode.com <http://livecode.com/>. 
Modifying it to use the key file, I have:

on mouseUp
   local tHeaders, tResult, tSettings
   put “" into tSettings["username"]
   put URL "binfile:D:\private.ppk" into tPrivKey
   put tPrivKey into tSettings["ssh_priv_key"]
   tsNetInit
   put tsNetGet("1", "sftp://secure..us/;, tHeaders, 
"transferComplete", tSettings) into tResult
end mouseUp

However, i

Re: SFTP with .PPK file

2017-03-17 Thread Charles Warwick via use-livecode

Hi Steve,

My apologies... there is a mistake in the documentation for tsNet which 
I only just noticed.


The array element for the SSH private key should be 
tSettings["ssh_private_key"], not tSettings["ssh_priv_key"].


So if you change the following line:

put tPrivKey into tSettings["ssh_priv_key"]

to:

put tPrivKey into tSettings["ssh_private_key"]

you should be right to go!

(I will get this fixed in the documentation for the next version)

Best Regards,

Charles


On 17/03/2017 6:31 PM, Charles Warwick via use-livecode wrote:

Hi Steve,

The tsNet command only requires the SSH private key, so that is ok.

I will test again here to make sure there is nothing else going on in 
LC 9.0 DP6


Just to check though, I assume your private key does not require a 
passphrase?


Another thing to try is to download the following simple stack:

https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode

Run that stack at the same time as your own, and click "Start Debug" 
before you try make the SSH connection.


It should provide some additional debug information that may shed more 
light on what is actually happening.


Regards,

Charles


On 16/03/2017 10:24 PM, Stephen MacLean via use-livecode wrote:

Hi Charles,

One other thing… in looking at the .ppk file, it contains both 
“public lines”  and "private lines”. All I see in the ssh key file is 
private.


Not sure that make any difference, but thought I’d mention it.

Best,

Steve

On Mar 16, 2017, at 7:53 AM, Stephen MacLean via use-livecode 
<use-livecode@lists.runrev.com> wrote:


Hi Charles,

Thank you so much for reply!

I converted the key file as you described, however, I’m still 
getting the error 67 (authentication error) when running the script.


Any further help would be greatly appreciated.

Best,

Steve MacLean

On Mar 16, 2017, at 3:08 AM, Charles Warwick via use-livecode 
<use-livecode@lists.runrev.com> wrote:


Hi Steve,

It looks like you are using a SSH private key in PuTTY format 
(.ppk).  tsNet requires it to be in OpenSSH format.


That is easy to fix though, you can convert the .ppk with PuttyGen.

To do this, open PuttyGen and load the .ppk file.  Then select 
"Conversions" -> "Export OpenSSH key".


Apart from that, just make sure that your call to tsNetGet includes 
the full path of the file you want to download.


Hope that helps,

Cheers,

Charles


On 16/03/2017 6:01 AM, Stephen MacLean via use-livecode wrote:

Well, still no luck in getting it to work, but getting closer…

I found a sample file linked to on livecode.com 
<http://livecode.com/>. Modifying it to use the key file, I have:


on mouseUp
   local tHeaders, tResult, tSettings
   put “" into tSettings["username"]
   put URL "binfile:D:\private.ppk" into tPrivKey
   put tPrivKey into tSettings["ssh_priv_key"]
   tsNetInit
   put tsNetGet("1", "sftp://secure..us/;, tHeaders, 
"transferComplete", tSettings) into tResult

end mouseUp

However, it returns:

tsneterr: (67) Authentication failure

Again, I can access the sftp site with no problems using the 
WinSCP ftp client and the key file.


Any suggestions??

Thanks,

Steve MacLean

On Mar 15, 2017, at 9:38 AM, Stephen MacLean via use-livecode 
<use-livecode@lists.runrev.com> wrote:


Hi All,

Looking to use tsNet to connect to a SFTP server that uses 
username and a private key instead of a password. The private key 
is contained in a file.


I use WinSCP and can link the connection to the file and can 
connect fine.


In LC, I’ve set the CABundle to the file, but am not sure this is 
how it’s supposed to work. Getting an auth error when doing 
tsNetGet.


Any help would be appreciated.

Thanks,

Steve MacLean

PS: Running 9.0 dp6 Business

___
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

___
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


___
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



___
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



___
use-livecode mailing list
use-livecode@

Re: SFTP with .PPK file

2017-03-17 Thread Charles Warwick via use-livecode

Hi Steve,

The tsNet command only requires the SSH private key, so that is ok.

I will test again here to make sure there is nothing else going on in LC 
9.0 DP6


Just to check though, I assume your private key does not require a 
passphrase?


Another thing to try is to download the following simple stack:

https://downloads.techstrategies.com.au/tsnet/debug_liburl.livecode

Run that stack at the same time as your own, and click "Start Debug" 
before you try make the SSH connection.


It should provide some additional debug information that may shed more 
light on what is actually happening.


Regards,

Charles


On 16/03/2017 10:24 PM, Stephen MacLean via use-livecode wrote:

Hi Charles,

One other thing… in looking at the .ppk file, it contains both “public lines”  and 
"private lines”. All I see in the ssh key file is private.

Not sure that make any difference, but thought I’d mention it.

Best,

Steve


On Mar 16, 2017, at 7:53 AM, Stephen MacLean via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi Charles,

Thank you so much for reply!

I converted the key file as you described, however, I’m still getting the error 
67 (authentication error) when running the script.

Any further help would be greatly appreciated.

Best,

Steve MacLean


On Mar 16, 2017, at 3:08 AM, Charles Warwick via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi Steve,

It looks like you are using a SSH private key in PuTTY format (.ppk).  tsNet 
requires it to be in OpenSSH format.

That is easy to fix though, you can convert the .ppk with PuttyGen.

To do this, open PuttyGen and load the .ppk file.  Then select "Conversions" -> 
"Export OpenSSH key".

Apart from that, just make sure that your call to tsNetGet includes the full 
path of the file you want to download.

Hope that helps,

Cheers,

Charles


On 16/03/2017 6:01 AM, Stephen MacLean via use-livecode wrote:

Well, still no luck in getting it to work, but getting closer…

I found a sample file linked to on livecode.com <http://livecode.com/>. 
Modifying it to use the key file, I have:

on mouseUp
   local tHeaders, tResult, tSettings
   put “" into tSettings["username"]
   put URL "binfile:D:\private.ppk" into tPrivKey
   put tPrivKey into tSettings["ssh_priv_key"]
   tsNetInit
   put tsNetGet("1", "sftp://secure..us/;, tHeaders, 
"transferComplete", tSettings) into tResult
end mouseUp

However, it returns:

tsneterr: (67) Authentication failure

Again, I can access the sftp site with no problems using the WinSCP ftp client 
and the key file.

Any suggestions??

Thanks,

Steve MacLean


On Mar 15, 2017, at 9:38 AM, Stephen MacLean via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi All,

Looking to use tsNet to connect to a SFTP server that uses username and a 
private key instead of a password. The private key is contained in a file.

I use WinSCP and can link the connection to the file and can connect fine.

In LC, I’ve set the CABundle to the file, but am not sure this is how it’s 
supposed to work. Getting an auth error when doing tsNetGet.

Any help would be appreciated.

Thanks,

Steve MacLean

PS: Running 9.0 dp6 Business

___
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

___
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


___
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



___
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



___
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



___
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

Re: AW: tsneterr: (6) could not resolve host - can anyone else test this?

2017-03-16 Thread Charles Warwick via use-livecode
I have not been able to replicate this issue here, but I am using an 
older version of Windows.


Is there anyone that can try this on various versions of Windows to see 
if this problem is specific to Win 10?


Try typing the following into the message box:

put URL 
"http://test_auth:test_p...@downloads.techstrategies.com.au/test_auth/;


If it is successful, you should see "Authentication successful." appear 
in the message box.


Thanks,

Charles


On 16/03/2017 6:31 PM, Charles Warwick via use-livecode wrote:

Hi Tiemo,

I have not heard of this issue before but will see if I can reproduce 
it and get back to you.


A workaround would be to use the tsNetGetSync function directly so 
that you can specify the user/pass separately like this:


--
local tHeaders, tOutHeaders, tResultCode, tBytes, tSettings
put "public" into tSettings["username"]
put "myPW" into tSettings["password"]
put tsNetGetSync("http://www.myHost/mypath/my.txt;, tHeaders, 
tOutHeaders, tResultCode, tBytes, tSettings) into tResult

--

Hope that helps,

Cheers,

Charles


On 16/03/2017 1:00 AM, Tiemo Hollmann TB via use-livecode wrote:

Forgot to say: Windows 10

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im 
Auftrag

von Tiemo Hollmann TB via use-livecode
Gesendet: Mittwoch, 15. März 2017 16:00
An: LiveCode User Liste senden <use-livecode@lists.runrev.com>
Cc: Tiemo Hollmann TB <toolb...@kestner.de>
Betreff: tsneterr: (6) could not resolve host

Hello,

using LC 8.1.2 / 8.1.3 I get an "tsneterr: (6) could not resolve host:
public" when trying to access a file in a web server directory with 
user and

password protection

put URL "http://public:myPW@www.myHost/mypath/my.txt; into tResult

when opening the same file in a not pw protected directory, 
everything is

fine and I get the content of the file

Testing the same with 8.1 or 9.0 dp 4 it works also with the pw 
protected

dir, like it should.

Is this a known issue with tsnet? Any workarounds?

Thanks

Tiemo





___
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


___
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




___
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




___
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


Re: AW: tsneterr: (6) could not resolve host

2017-03-16 Thread Charles Warwick via use-livecode

Hi Tiemo,

I have not heard of this issue before but will see if I can reproduce it 
and get back to you.


A workaround would be to use the tsNetGetSync function directly so that 
you can specify the user/pass separately like this:


--
local tHeaders, tOutHeaders, tResultCode, tBytes, tSettings
put "public" into tSettings["username"]
put "myPW" into tSettings["password"]
put tsNetGetSync("http://www.myHost/mypath/my.txt;, tHeaders, 
tOutHeaders, tResultCode, tBytes, tSettings) into tResult

--

Hope that helps,

Cheers,

Charles


On 16/03/2017 1:00 AM, Tiemo Hollmann TB via use-livecode wrote:

Forgot to say: Windows 10

-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von Tiemo Hollmann TB via use-livecode
Gesendet: Mittwoch, 15. März 2017 16:00
An: LiveCode User Liste senden 
Cc: Tiemo Hollmann TB 
Betreff: tsneterr: (6) could not resolve host

Hello,

using LC 8.1.2 / 8.1.3 I get an "tsneterr: (6) could not resolve host:
public" when trying to access a file in a web server directory with user and
password protection

put URL "http://public:myPW@www.myHost/mypath/my.txt; into tResult

when opening the same file in a not pw protected directory, everything is
fine and I get the content of the file

Testing the same with 8.1 or 9.0 dp 4 it works also with the pw protected
dir, like it should.

Is this a known issue with tsnet? Any workarounds?

Thanks

Tiemo

  

  

  

  


___
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


___
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




___
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


Re: SFTP with .PPK file

2017-03-16 Thread Charles Warwick via use-livecode

Hi Steve,

It looks like you are using a SSH private key in PuTTY format (.ppk).  
tsNet requires it to be in OpenSSH format.


That is easy to fix though, you can convert the .ppk with PuttyGen.

To do this, open PuttyGen and load the .ppk file.  Then select 
"Conversions" -> "Export OpenSSH key".


Apart from that, just make sure that your call to tsNetGet includes the 
full path of the file you want to download.


Hope that helps,

Cheers,

Charles


On 16/03/2017 6:01 AM, Stephen MacLean via use-livecode wrote:

Well, still no luck in getting it to work, but getting closer…

I found a sample file linked to on livecode.com . 
Modifying it to use the key file, I have:

on mouseUp
local tHeaders, tResult, tSettings
put “" into tSettings["username"]
put URL "binfile:D:\private.ppk" into tPrivKey
put tPrivKey into tSettings["ssh_priv_key"]
tsNetInit
put tsNetGet("1", "sftp://secure..us/;, tHeaders, 
"transferComplete", tSettings) into tResult
end mouseUp

However, it returns:

  tsneterr: (67) Authentication failure

Again, I can access the sftp site with no problems using the WinSCP ftp client 
and the key file.

Any suggestions??

Thanks,

Steve MacLean


On Mar 15, 2017, at 9:38 AM, Stephen MacLean via use-livecode 
 wrote:

Hi All,

Looking to use tsNet to connect to a SFTP server that uses username and a 
private key instead of a password. The private key is contained in a file.

I use WinSCP and can link the connection to the file and can connect fine.

In LC, I’ve set the CABundle to the file, but am not sure this is how it’s 
supposed to work. Getting an auth error when doing tsNetGet.

Any help would be appreciated.

Thanks,

Steve MacLean

PS: Running 9.0 dp6 Business

___
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

___
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



___
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

Re: ulExtIsBlocked

2017-02-16 Thread Charles Warwick via use-livecode

Sounds like the tsNetLibUrl stack may have been unloaded.

Is it possible this bug is affecting you?

http://quality.livecode.com/show_bug.cgi?id=18833


On 16/02/2017 6:33 PM, J. Landman Gay via use-livecode wrote:

I keep getting this message, both in the IDE and in a standalone:

 Message execution error:
 Error description: Function: error in function handler
 Hint: ulExtIsBlocked

It's either a libURL or TSNet error, so it looks like a thing for 
Charles W. Thoughts? I need a workaround.





___
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


Re: TS Net for Indy vs Business

2017-01-06 Thread Charles Warwick via use-livecode

Hi Bill and others,

I appreciate the feedback regarding the feature breakdown between the 
different licenses.


The decision to split the features (and how they were split) across 
Business and Indy was decided on by the LiveCode team.


I expect that some of them may have seen this thread, however I 
recommend contacting them directly if you want to ensure that they hear 
your thoughts.


Regards,

Charles


On 4/01/2017 7:47 AM, William Prothero wrote:

Charles:
It also seems to me like this is a vital feature that could cripple some 
applications. I agree with the other posters that the Indy version will 
probably be purchased by the great majority of those who purchase licenses. It 
“should” be a big market.

Best,
Bill


Skip Kimpel  wrote:

+1

LC needs to reconsider breaking up functionality based upon licensing.

SKIP

___
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


___
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



___
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