On 3/21/06, doug b <[EMAIL PROTECTED]> wrote:
> I'm writing an extension which reads from and writes to network streams
> implemented via sockets. When writing to a stream (nsIOpenOutputStream)
> I'll get the error "NS_BASE_STREAM_WOULD_BLOCK" which the docs tell me
> is because I'm trying to write to a full buffer.
>
> Can anyone point me in the right direction to get around this...I was
> assuming asyncOutputStream but I can't quite see how you implement it.

http://xulplanet.com/references/xpcomref/ifaces/nsIAsyncOutputStream.html
http://www.xulplanet.com/references/xpcomref/ifaces/nsIOutputStreamCallback.html

When you get NS_BASE_STREAM_WOULD_BLOCK call AsyncWait and then
continue writing from the OnOutputStreamReady notification.

> _______________________________________________
> dev-tech-xpcom mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-xpcom
>


--
Jon Smirl
[EMAIL PROTECTED]
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to