static PeerInfoProvider forHostAndPort(final String host, final int port) {
        return new PeerInfoProvider() {
            @Override
            String getHostname() {
                return host;
            }

            @Override
            public String getHostnameOrIP() {
                return host;
            }

            @Override
            public int getPort() {
                return port;
            }
        };
    }
Gets the port of the peer.
common/src/main/java/org/conscrypt/PeerInfoProvider.java