On 3/4/06, Christian Biesinger <[EMAIL PROTECTED]> wrote:
> The design of necko is that threads are an implementation detail. For
> channels and server sockets, the idea is that all callbacks happen on
> the thread that called asyncOpen/asyncListen. That means that in the
> implementation threads and events are used, but these are transparent to
> the caller.

They aren't totally transparent because things like
nsIInputStreamCallback are getting called on the socket thread. I'm
starting to figure this out and get things set up right.

My next problem, when using nsIServerSocketListener how do I tell when
the socket has been closed so I don't loop doing AsyncWait with no
data available.

The header for the available() method says it will return
NS_BASE_STREAM_CLOSED but it doesn't seem to be doing that. I looked
at the source for available() and I can't see where it would return
NS_BASE_STREAM_CLOSED. And in my code it isn't returning
NS_BASE_STREAM_CLOSED, it just returns zero available and I loop.

Is there another mechism for catching a stream close?


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

Reply via email to