I want to use a SocketChannel
and to have a timeout for its read/write methods. I've tried to set a timeout for the Socket that owns my SocketChannel
like this:
channel.socket().setSoTimeout(TIMEOUT);
but that doesn't work. Is there any other solution?
ClosedByInterruptException.
Not very useful. I was told this bizarre implementation is mandated by the behaviour of Linux. – Enfield