Add outbound port to the outbound port list

@param port outbound port
@return ClientNetworkConfig
546614
public ClientNetworkConfig addOutboundPort(int port) {
        if (outboundPorts == null) {
            outboundPorts = new HashSet<Integer>();
        }
        outboundPorts.add(port);
        return this;
    }
708881
def port_add_nio_binding(self, port_number, nio):
        

        if not self._ethernet_adapter.port_exists(port_number):
            raise VPCSError("Port {port_number} doesn't exist in adapter {adapter}".format(adapter=self._ethernet_adapter,
                                                                                           port_number=port_number))

        if self.is_running():
            yield from self.add_ubridge_udp_connection("VPCS-{}".format(self._id), self._local_udp_tunnel[1], nio)

        self._ethernet_adapter.add_nio(port_number, nio)
        log.info('VPCS "{name}" [{id}]: {nio} added to port {port_number}'.format(name=self._name,
                                                                                  id=self.id,
                                                                                  nio=nio,
                                                                                  port_number=port_number))

        return nio
6420
public ContainerNetworkingConfig aliases(NetworkConfig config) {
        JsonObject endPoints = new JsonObject();
        endPoints.add("Aliases", JsonFactory.newJsonArray(config.getAliases()));

        JsonObject endpointConfigMap = new JsonObject();
        endpointConfigMap.add(config.getCustomNetwork(), endPoints);

        networkingConfig.add("EndpointsConfig", endpointConfigMap);
        return this;
    }
830554
@Override
    public synchronized long getNewCompletionPort() throws AsyncException {
        long port = aio_newCompletionPort();
        completionPorts.add(Long.valueOf(port));
        return port;
    }
76203
public void bindAndStart(int port) throws Exception {
        server = new NioServer(new StreamConnectionFactory() {
            @Override
            public ProtobufConnection<Protos.TwoWayChannelMessage> getNewConnection(InetAddress inetAddress, int port) {
                return new ServerHandler(new InetSocketAddress(inetAddress, port), timeoutSeconds).socketProtobufHandler;
            }
        }, new InetSocketAddress(port));
        server.startAsync();
        server.awaitRunning();
    }
476425
public static HttpClient<ByteBuf, ByteBuf> newClient(String host, int port) {
        return newClient(new InetSocketAddress(host, port));
    }
771620
public static NetworkPort remotePort(String hostname, int port){
        return new RemoteNetworkPort(hostname, port, NetworkPort.Type.TCP);
    }
826317
public static Address from(int port) {
    try {
      InetAddress address = getLocalAddress();
      return new Address(address.getHostName(), port);
    } catch (UnknownHostException e) {
      throw new IllegalArgumentException("Failed to locate host", e);
    }
  }
1087465
public Map<String, Object> getOutboundConnectionInfoInternal() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "getOutboundConnectionInfoInternal");
        return this.outboundConnectionInfoInternal;
    }
1168880
public static HostAndPort of(String host, int port) {

        LettuceAssert.isTrue(isValidPort(port), String.format("Port out of range: %s", port));

        HostAndPort parsedHost = parse(host);
        LettuceAssert.isTrue(!parsedHost.hasPort(), String.format("Host has a port: %s", host));
        return new HostAndPort(host, port);
    }
426448
def add_port_to_free_pool(self, port):
        """"""
        if port < 1 or port > 65535:
            raise ValueError(
                'Port must be in the [1, 65535] range, not %d.' % port)
        port_info = _PortInfo(port=port)
        self._port_queue.append(port_info)
1143816
public Map<String, Object> getOutboundConnectionInfo() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "getOutboundConnectionInfo");
        Map<String, Object> outboundConnectionInfo = ThreadManager.getInstance().getOutboundConnectionInfo();
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "getOutboundConnectionInfo", outboundConnectionInfo);
        return outboundConnectionInfo;
    }
106149
public Node addNode(@NonNull String ip, @NonNull int port) {
        val node = Node.builder()
                .id(ip)
                .port(port)
                .upstream(null)
                .build();

         return this.addNode(node);
    }
1050621
public HostPort setPassive(int port, int queue)
        throws IOException{

        if (serverSocket == null) {
            ServerSocketFactory factory =
                ServerSocketFactory.getDefault();
            serverSocket = factory.createServerSocket(port, queue);
        }

        session.serverMode = Session.SERVER_PASSIVE;

        String address = Util.getLocalHostAddress();
        int localPort = serverSocket.getLocalPort();

        if (remoteControlChannel.isIPv6()) {
            String version = HostPort6.getIPAddressVersion(address);
            session.serverAddress =
                new HostPort6(version, address, localPort);
        } else {
            session.serverAddress =
                new HostPort(address, localPort);
        }

        logger.debug("started passive server at port " +
                     session.serverAddress.getPort());
        return session.serverAddress;

    }
695657
public ServerSocketBar create(InetAddress host, int port)
    throws IOException, GeneralSecurityException
  {
    SSLServerSocketFactory ssFactory = null;
    
    if (_keyStore != null) {
      SSLContext sslContext = SSLContext.getInstance(_sslContext);

      KeyManagerFactory kmf
        = KeyManagerFactory.getInstance(keyManagerFactory());
    
      kmf.init(_keyStore, keyStorePassword().toCharArray());
      
      sslContext.init(kmf.getKeyManagers(), null, null);

      /*
      if (_cipherSuites != null)
        sslContext.createSSLEngine().setEnabledCipherSuites(_cipherSuites);

      if (_protocols != null)
        sslContext.createSSLEngine().setEnabledProtocols(_protocols);
      */
      
      SSLEngine engine = sslContext.createSSLEngine();
      
      engine.setEnabledProtocols(enabledProtocols(engine.getSupportedProtocols()));

      ssFactory = sslContext.getServerSocketFactory();
    }
    else {
      ssFactory = createAnonymousServerFactory(host, port);
    }
    
    ServerSocket serverSocket;

    int listen = 100;

    if (host == null)
      serverSocket = ssFactory.createServerSocket(port, listen);
    else
      serverSocket = ssFactory.createServerSocket(port, listen, host);

    SSLServerSocket sslServerSocket = (SSLServerSocket) serverSocket;
    
    if (_cipherSuites != null) {
      sslServerSocket.setEnabledCipherSuites(_cipherSuites);
    }
    
    if (_cipherSuitesForbidden != null) {
      String []cipherSuites = sslServerSocket.getEnabledCipherSuites();
      
      if (cipherSuites == null)
        cipherSuites = sslServerSocket.getSupportedCipherSuites();
      
      ArrayList<String> cipherList = new ArrayList<String>();
      
      for (String cipher : cipherSuites) {
        if (! isCipherForbidden(cipher, _cipherSuitesForbidden)) {
          cipherList.add(cipher);
        }
      }
      
      cipherSuites = new String[cipherList.size()];
      cipherList.toArray(cipherSuites);
      
      sslServerSocket.setEnabledCipherSuites(cipherSuites);
    }

    sslServerSocket.setEnabledProtocols(enabledProtocols(sslServerSocket.getSupportedProtocols()));
    
    if ("required".equals(_verifyClient))
      sslServerSocket.setNeedClientAuth(true);
    else if ("optional".equals(_verifyClient))
      sslServerSocket.setWantClientAuth(true);

    return new ServerSocketWrapper(serverSocket);
  }
53557
protected Server configureJetty(final int port) {
        final Server server = new Server();
        final ServerConnector connector = new ServerConnector(server);
        final ServletContextHandler sch = getServletContextHandler();

        // TODO: make all of this configurable
        connector.setIdleTimeout((int)TimeUnit.HOURS.toMillis(1));
        connector.setSoLingerTime(-1);
        connector.setPort(port);

        server.addConnector(connector);

        // set the injector as an attribute in the context
        sch.setAttribute("guice-injector", getInjector());

        // prevent the JSESSIONID from getting set via a URL argument
        sch.setInitParameter("org.eclipse.jetty.servlet.SessionIdPathParameterName", "none");

        // if we're using a database, then install the filter
        if(!settings.getDatabaseSettings().getNotUsed()) {
            // setup a FilterHolder for the Guice Persistence
            final FilterHolder persistFilter = new FilterHolder(getInjector().getInstance(PersistFilter.class));

            // add the filter to the context
            sch.addFilter(persistFilter, "/*", DISPATCHER_TYPES);
        }

        // configure a FilterHolder for Guice
        final FilterHolder filterHolder = new FilterHolder(GuiceFilter.class);

        sch.addFilter(filterHolder, "/*", DISPATCHER_TYPES);
        sch.addServlet(DefaultServlet.class, "/*");

        //server.setDumpAfterStart(true);
        server.setHandler(sch);


        return server;
    }
1241420
public static boolean isPortAvailable(final int port) {

        try (ServerSocket tcp = new ServerSocket(port);
            DatagramSocket udp = new DatagramSocket(port)) {
            return tcp.isBound() && udp.isBound();
        } catch (Exception e) { //NOSONAR
            return false;
        }
    }