> in.available() returns 0 on two conditions, there is nothing to read > because the other node has not sent a message, and there is nothing > to read because the stream has ended. This is very annoying. Someone > tell me a good way (short of reading the data, which I can figure out > for myself, but which a) eats the data we want in the message b) > locks) to differentiate between the two and I will be a happy man.
Awkward as it seems, why not go ahead and do as you suggested? Make RawMessage take a PushbackInputStream, so that ConnectionHandler can read a byte and then push it back before passing it down? Would this help with the problem reported earlier that showed a huge number of unterminated threads and unclosed sockets? Or was that an internal Java thread/socket problem? Hal _______________________________________________ Freenet-dev mailing list Freenet-dev at lists.sourceforge.net http://lists.sourceforge.net/mailman/listinfo/freenet-dev
