Andrew C. Oliver wrote:
> I guess if I open up a reaper thread I could do that.. . I can't very
> well close the stream if I'm blocked on the write call  (hence the
> bind)..  I would rather not open up a thread to do that, but I guess I
> can if I have to.

Yes, I imagine you could start a timer in a separate Thread before starting the write().

I had a problem which seems similar: how to shut down an incoming SMTP stream which was taking too long. I found a discussion which advanced that idea which I passed on (close the stream, catch the IOException).

From the discussion I saw, the people at Sun know this is ugly, and that is why they added java.nio.channels, in 1.4 I believe. In the JavaDoc I see, "Socket channels support non-blocking connection". Perhaps there would be a way you could use those. I don't know.

Rich


_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to