logger.trace("Writing data to socket");
getContext(key, (SocketChannel) key.channel()).writeBufferToClient();
}
if (key.isAcceptable()) {
SocketChannel client = acceptConnection();
logger.trace("Accepted new connection from "+client.socket().getRemoteSocketAddress());
}
logger.trace("Selected key is processed.");
i.remove(); // remove the key
} catch (CancelledKeyException e) {
logger.debug("Cancelled selected key, ignoring.");