While those logs were interesting, they don't really work here, because: a) It delt with ServerSocket.accept() and ServerSocket.setSoTimeout(), while we are dealing with Socket.getInputStream().read() and Socket.setSoTimeout().
b) The problem with the ServerSocket was that setSoTimeOut() wasn't working at all, but apparently it is working with the normal Socket, only setting to zero is not turning off the timing out for some reason. c) None of the options they gave for alternatives to setSoTimeout() will work in our case (one was connecting to the socket when you want to close so that accept() unlocks, but we can't write something to the stream, the other was just killing the socket and catching the exception - but I don't want to kill the Socket because it _could_ still be reading). However, it isn't really an issue with us, since setting the timeout to some high but finite number for the actual reading of the message makes fine sense (and will save us from waiting too long on hung connections anyways). I was not too impressed by the ingenuity of the people on that list (well, connecting to yourself is nice in a hackish sort of way), but if somebody feels like it they can of course take it there. It was nice to see that I am not alone in thinking that the fact that one can't interrupt() the thread during the blocking IO operations is just insanity. On Sat, 15 Apr 2000, Tom Ritchford wrote: > Paul Kappler <kapplepc at mac.com> writes: > > >There is a Timeout problem on my Macintosh > >c.setSoTimeout(100); in connection handler causes problems. > > This problem appeared intermittently on the MRJ list last year. > > The best discussion of this is in the following 7 digests > > <http://public.lists.apple.com/digests/mrj-dev/1999/99-Nov/v01.n1414> > > through (ie 14, 15, 16, 17, 18, 19, 20) > > <http://public.lists.apple.com/digests/mrj-dev/1999/99-Nov/v01.n1420> > > > which has some workarounds and a candid discussion by an Apple engineer > (the phenomenal Jens Alfke). > > /t > > > ...get extreme internet radio at <http://extremeNY.com/radio>... > > > _______________________________________________ > Freenet-dev mailing list > Freenet-dev at lists.sourceforge.net > http://lists.sourceforge.net/mailman/listinfo/freenet-dev -- Oskar Sandberg md98-osa at nada.kth.se #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) _______________________________________________ Freenet-dev mailing list Freenet-dev at lists.sourceforge.net http://lists.sourceforge.net/mailman/listinfo/freenet-dev
