On Mon, Aug 4, 2008 at 8:24 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Aug 3, 8:29 am, "Christian Biesinger" <[EMAIL PROTECTED]> wrote: >> 1) should definitely work, I think so should 2). Can you file a bug >> with complete testcase? >> >> Of course you could also just write to the output stream before the >> connection is established. > > This did work, at least on my Vista box. Need further testing, with > other > versions and platforms. This was using solution 2, waiting for > the onOutputStreamReady method to fire, and simply writing to the > stream.
After thinking some more, it is expected that isAlive() returns false in this case, because the stream you are getting is just one end of an empty pipe, which is of course ready to receive input. And that's why writing to the stream before isAlive() returns true is supported - you write to the pipe, and once the connection is established, the data will be written from the pipe to the socket. Personally I wouldn't bother with calling asyncWait, because that will pretty much immediately call the callback in this case. But there's no harm in calling asyncWait either. -christian _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
