Hi,

I'm trying to implement the 9P2000 protocol for Mozilla in  
JavaScript, and came across XPConnect which seems to be the right  
tool for the job. Although I am able to understand how sockets can  
work with XPConnect, it seems that they were designed primarily to  
accept and provide text as data.

I need to to be able to send arbitrary amounts of binary data from  
and to the socket, even strings used in the protocol are encoded as  
UTF-8 unicode characters. While going through the XPCOM documentation  
at xulplanet.com, I came across the nsIBinaryInputStream and  
nsIBinaryOutputStream interfaces, but they seem to provide methods  
only to read 8, 16, 32 or 64 bytes of data at a time, that too in a  
fixed big-endian format.

The 9P2000 protocol specifies that all data must be encoded in the  
little-endian format, in addition to the ability to transmit variable  
amounts of bytes. Can this be done with XPConnect? Any pointers will  
be greatly appreciated.

Thanks,
--
Anant Narayanan
http://www.kix.in/
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to