docs: public void destroy()
      {
          for (Socket socket : sockets) {
              destroySocket(socket);
          }
          sockets.clear();
  
          for (Selector selector : selectors) {
              context.close(selector);
          }
          selectors.clear();
  
          // Only terminate context if we are on the main thread
          if (isMain()) {
              context.term();
          }
      }