chatzilla implements low-level socket i/o using nsISocketTransport from javascript. you should check it out. however, please note that nsISocketTransport and related interfaces are not frozen. this means that your application may not work with future versions of mozilla. frozen interfaces will contain the text: "@status FROZEN" near the top of the file (e.g., see nsIURI.idl).
darin
Raj Saini wrote:
Dear All,
I am working on a project where by I have decided to use the Mozilla technologies for front end GUI. The Client side GUI application is a lightweight client based on XUL and Gecko engine.
The business layer of the application is developed in Java using the jakarta-avalon architecture. Since, this application uses the async message processing, I have decided that the communication between client and server will be based on the raw sockets.
How can I use the sockets from javascripts for communicating with my server application. I had a look on the nsISocketTransport, nsISocketProvider and nsISocketTransportService interfaces. Can some one point me to some documentation or sample code which I can refer.
How I do it in java is:-
Create a socket on a designated host and port
open the input and output streams.
Read and write the data on input and output streams respectively.
Thankyou in advance.
Raj Saini
