[Jslib] socket.js, chatzilla and ...shudder...definitions
stknight at ultralifebatteries.com
Tue Sep 16 12:02:48 EDT 2003
Pete Collins wrote:
> Charles Melhorn wrote:
[ snip ]
>> You may find something useful in my version of socket.js, which
>> I cobbled together from the JsLib file and from the version used
>> in Chatzilla. It's not as polished, generalized, or commented as
>> it should be, and has only been tested with Mozilla 1.2 and 1.3;
>> however, I did consult with both Rob Ginda (Chatzilla author) and
>> Darin Fisher (primary necko developer) as I was developing it.
>> You can see how it's called (from the connectButtonHandler() routine)
>> Note that my socket class uses only asychronous routines, as the
>> synchronous calls weren't working with Moz 1.2/1.3.
excellent. I'll definitely be having a look at those.
> Thanks Charles!
> Since socket.js is *so* old and horribly broken, how about we use
> Charles code as a starting point.
> The motto here is "if it works, check it in" :-)
> Steve, I know you are wokring on socket stuff. What are your thoughts?
As far as the synchronous routines are concerned...too late. I already have socket.js clubbed into
submission so my xul-app is able to open a connection to a "remote" device, send data and receive
the response. (it seems to work fine w/ Moz 1.4 but I'm unlikely to test with 1.2 or 1.3)
Just to make sure we're using the same terminology:
. synchronous: where the xul-application initiates the socket connection.
. asynchronous: where the xul-application waits for a connection.
(I have to do this because, while looking at the code, I realized I have a different definition of
synch vs. asynch than what's being used)
however, I'm definitely looking for shortcuts on the async since that's not really in the domain of
the application I'm currently working on. I've just started studying the chatzilla async routines
(which means a trudge back/forth thru www.xulplanet.com references, chatzilla and now....)
> Charles, is it cool if we swiped this code for jslib?
since he posted the links...I hope that's a moot point ;)
More information about the Jslib