code: private void openSelectors() throws IOException
      {
          readSelector = Selector.open();
          socket.register(readSelector, SelectionKey.OP_READ);
  
          writeSelector = Selector.open();
          socket.register(writeSelector, SelectionKey.OP_WRITE);
      }
docs: Open the read and write selectors. This needs to be done before data can
  be send through this socket manager using its own API (not the
  {@link #redirectChannel() redirected channel}). These selectors should be
  {@link #closeSelectors() closed} before redirecting the channel to
  prevent corruption.
  
  @throws IOException
  if an error occurs while opening either selector