je@brighton.ac.uk wrote in comp.lang.java.programmer:
> Can anyone tell me how to set matters up so that an ObjectInputStream
> (connected to a socket) can be made to time out if nothing is available
> to be read within a specified timeout period?
Have you tried Socket.setSoTimeout(int)?

Signature
Antti S. Brax Rullalautailu pitää lapset poissa ladulta
http://www.iki.fi/asb/ http://www.cs.helsinki.fi/u/abrax/hlb/
[1385 messages expunged from folder "Spam"]
John English - 30 Sep 2005 15:44 GMT
> je@brighton.ac.uk wrote in comp.lang.java.programmer:
>
[quoted text clipped - 3 lines]
>
> Have you tried Socket.setSoTimeout(int)?
Ah, of course -- silly me, I was worrying about the ObjectInputStream and
had forgotten that I can time out the socket...
Many thanks.
----------------------------------------------------------------------
John English | mailto:je@brighton.ac.uk
Senior Lecturer | http://www.it.bton.ac.uk/staff/je
School of Computing & MIS | "Those who don't know their history
University of Brighton | are condemned to relive it" (Santayana)
----------------------------------------------------------------------
>Can anyone tell me how to set matters up so that an ObjectInputStream
>(connected to a socket) can be made to time out if nothing is available
>to be read within a specified timeout period?
see http://mindprod.com/timer.html
You can then on the tick check if nothing has happened since the last
tick.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
Roedy Green - 30 Sep 2005 22:58 GMT
>see http://mindprod.com/timer.html
oops. Did it again. That should read:
http://mindprod.com/jgloss/timer.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.