OpenMoko light web server
Alexander E Genaud
alex at genaud.net
Tue Apr 17 12:37:34 CEST 2007
I believe Microsoft created the non-standard XMLHttpRequest object
through Active X around IE 5 but it has become something of a standard
implemented by Firefox, Safari/Konquerer, Opera, and perhaps others.
I've been using a nice wrapper, Sarissa, successfully for a few years
in many environments.
I believe the asynchronous flag is implemented in those major
browsers. Alternatively, you can create an HttpConnection "class" with
it's own timeout, abort, polling (4K), threading, etc. While the
details are different across browsers, it seems that threads never
context switches unless explicitly asked to do so (such as Timeouts
and alert dialogs). In other words, a "ring" might come in, but if you
are calculating the Fibonacci numbers to the umpteenth power, the
"ring" thread probably won't alert you in good time. I believe that is
true regardless of the async flag.
> ---------- Videresendt meddelelse ----------
> From: Tim Newsom <cephdon at gmail.com>
> Date: Mon, 16 Apr 2007 21:36:04 -0700
> Subject: Re: OpenMoko light web server
> Ok.. Well this is probably somewhat browser specific, but in the
> XMLHttpRequest methods there is a synchronous or asynchronous flag.
> Synchronously will behave in the normal request response method and wait
> for a return before continuing to execute... Async will allow the code
> to continue executing and then fire the response once it sees it. I
> don't know if there are timeouts or not and I have not played around
> with it much, but it seems like you could build several request
> objects... One might be dedicated to the ringing function.. Then place a
> timer on it and if there is no response by the timeout you could reset.
> All the request would do is ask if the phone rang and wait.. Then your
> cgi code could sit for the period of the timeout waiting for either a
> request (to cover the situation of the phone ringing between requests)
> or responding when the phone rings...
亚 | alex at genaud.net
历 | http://genaud.net
山 | GPS: [ 55.67N 12.588E ]
大 | PGP: CCC7 D19D D107 F079 2F3D BF97 8443 DB5A 6DB8 9CE1
More information about the community