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?