code: public ServerSocketEndpointConfig setPort(int port) {
          if (port < 0 || port > PORT_MAX) {
              throw new IllegalArgumentException("Port out of range: " + port + ". Allowed range [0,65535]");
          }
          this.port = port;
          return this;
      }
docs: Sets the port the Hazelcast member will try to bind on.
  
  A valid port value is between 0 and 65535.
  A port number of 0 will let the system pick up an ephemeral port.
  
  @param port the port the Hazelcast member will try to bind on
  @return NetworkConfig the updated NetworkConfig
  @see #getPort()
  @see #setPortAutoIncrement(boolean) for more information