Non-blocking transfers ...

Ken Corey ken at kencorey.com
Tue Jul 17 14:05:47 EDT 2012


I've written a small asynchronous HTTP library based on rresocket that 
allows for access to headers.

Your code looks like this:

on openCard
   httpGet "http://my.url.path/blah","callBackFunctionName"
   [...]
end openCard

on callBackFunctionName
   [...]
   put httpBuildCookies() into tCookie
end callBackFunctionName

[...]
   -- somewhere later in the code
   set httpHeaders to tCookie
   httpGet "http://blah","newcallback" -- this will have the cookies

Only problem is that rresocket doesn't work on Android, and I wanted to 
support Android, so I had to come up with another way to accomplish this.

Therefore, this library is a very rough outline.  It works, for some 
definition of works, but has not been stress tested, and I didn't 
explore it.

I can package it up in a few weeks, if anyone is interested.

-Ken


On 17/07/2012 18:06, gpb01 wrote:
> As I know, is possible to transfer a file using the URL in a non-blocking way
> only for the HTTP GET (put URL "...myURL..." into myVAR) using the "load"
> command, but ... there is a way to have a non-blocking transfer also for the
> HTTP PUT (put myVAR into URL "...myURL") and HTTP POST (post myData to URL
> "...myURL...") ?
>
> Please note, I need for HTTP and NOT for FTP and, possiby, should be
> available on iOS (/so ... no libURL/).






More information about the use-livecode mailing list