Hi!
Here's the situation:
I created a simple server using NIO that sends data to the client.
I write some data to the client socket and then cancel the SelectionKey, so that no more "ready to write" events occur with this socket, but the socket still is connected.
The problem is that I don't know how to register the socket with the selector again. I tried to do that (The server loop is in one thread, and I tried to register the socket from the main thread) but the main thread even blocked.
Can anyone help me to solve the problem?
bye
Chris
Here's the situation:
I created a simple server using NIO that sends data to the client.
I write some data to the client socket and then cancel the SelectionKey, so that no more "ready to write" events occur with this socket, but the socket still is connected.
The problem is that I don't know how to register the socket with the selector again. I tried to do that (The server loop is in one thread, and I tried to register the socket from the main thread) but the main thread even blocked.
Can anyone help me to solve the problem?
bye
Chris