Re: Serilializing the DOM and passing through nsISocketTransportService.

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <_4GdndtxhKoIfg3anZ2dnUVZ_hynnZ2d__28819.0151252367$1200678053$gmane$org@mozilla.org>
stony_dreams wrote:
> outstream.write(strGlob, strGlob.length);
> outstream.close();

Ignoring for the moment that your code will corrupt non-ASCII data, why exactly 
are you ignoring the return value of write()?  Please see 
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpcom/io/nsIOutputStream.idl&rev=3.12&mark=118#112> 
which clearly documents what the return value means.

For sockets, writing more than the socket can buffer will give you a short write 
and write() will indicate that.  In that case, you need to keep writing until 
all the data is written.

None of which has anything to do with the DOM.

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.