docs: public static Socket accept(ServerSocket serverSocket, final boolean runInANewThread,
                                  @ClosureParams(value=SimpleType.class, options="java.net.Socket") final Closure closure) throws IOException {
          final Socket socket = serverSocket.accept();
          if (runInANewThread) {
              new Thread(new Runnable() {
                  public void run() {
                      invokeClosureWithSocket(socket, closure);
                  }
              }).start();
          } else {
              invokeClosureWithSocket(socket, closure);
          }
          return socket;
      }