posted 19 years ago
Hi,
that's the matter,
Having to go to blocking mode with a previous Selector-registered SocketChannel to exec a transferFrom(), I have canceled its SelectionKey from the Selector.
After the transferFrom() the SocketChannel should back to noblocking mode with the Selector.
How make it ?
I tried with a selectionKey.cancel().
This works (go to block mode, transferFrom completes) till try to register again the channel with the selector:
selectionKey = socketChannel.register(selector, SelectionKey.OP_READ, null);
ends in a infinite loop (WHY ??).
What am I missing ? Any solution ?
thanks in advance
Luke