code: public ServerConfig setPort(int port) {
          if (!NetUtils.isRandomPort(port) && NetUtils.isInvalidPort(port)) {
              throw ExceptionUtils.buildRuntime("server.port", port + "",
                  "port must between -1 and 65535 (-1 means random port)");
          }
          this.port = port;
          return this;
      }
docs: Sets port.
  
  @param port the port
  @return the port