[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] Firefox Extension for external selectors

Very cool.  If we add support for Axel's selector (OpenInfoCard) and CardSpace, we will have coverage for all of the major selectors.  Thanks for your work on this Jeesmon.  BTW, I plan on starting work on a Safari add-on soon.  Is anyone else working on supporting Safari?  If so, we should collaborate.

-- Andy


>>> Jeesmon Jacob <JJacob@xxxxxxxxxxxxx> 05/01/08 5:45 AM >>>
Hi Mike/Tie Li,

I checked in a Firefox extension that can launch external selectors directly or using Higgins Selector Selector. It is based on Novell’s firefox addon for client based selector and it has the support to directly launch Higgins selectors (Client Based Selector, RCP Selector and AIR Selector). You can find more information on this extension at http://wiki.eclipse.org/Higgins_Browser_Extension_for_Firefox and installation steps at http://wiki.eclipse.org/Higgins_Browser_Extension_for_Firefox_Installation

I use nsISocketTransportService (http://developer.mozilla.org/en/docs/Proxies_in_Necko#SOCKS_and_nsISocketTransportService) to connect to RCP Selector from the browser. But I couldn't find a way to inform the socket server that there is no more data to send like you did in IE by calling shutdown with how = SD_SEND. So the while(true) loop in RCP Selector waits forever. I tried flushing and closing outputstream but socket server is not recognizing it as EOF. I cannot close the connection as the browser needs to wait for the token from RCP Selector. Until we figure out a solution (not sure whether we will), would it be possible for RCP Selector to break the while(true) loop if the input is terminated with the null char (\0)? I remember seeing \0 as the input terminator char in other socket implementations. Since \0 is not a legal char for the XML input that RCP Selector is getting, I don't think it will break anything else.

In line # 80 of org.eclipse.higgins.crpps/src/org/eclipse/higgins/crpps/service/RPPSService2.java (parseInput method)

change

while (true) {
                        int ch = in.read();
                        if (ch == -1)
                                break; // end-of-stream, assumes that sender closes sock @ end
                                                // of message. which is not a must in HTTP....
.....
}

to

while (true) {
                        int ch = in.read();
                        if (ch == -1 || ch == '\0')  // <------ break on null char also
                                break; // end-of-stream, assumes that sender closes sock @ end
                                                // of message. which is not a must in HTTP....
.....
}

I tested RCP Selector with this change and I was able to successfully use it from FF. Please let me know if this change can be committed so that we can use RCP selector for more platforms and browsers. I assume there is no FF extension is created for RCP Selector so far.

Thanks a lot for your input on this.

Regards,
Jeesmon
_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev