/** * Sets the application-layer protocols (ALPN) in prioritization order. * * @param socket the socket being configured * @param protocols the protocols in descending order of preference. If empty, no protocol * indications will be used. This array will be copied. * @throws IllegalArgumentException - if protocols is null, or if any element in a non-empty * array is null or an empty (zero-length) string */ public static void setApplicationProtocols(SSLSocket socket, String[] protocols) { toConscrypt(socket).setApplicationProtocols(protocols); }
/** * Sets the application-layer protocols (ALPN) in prioritization order. * * @param socket the socket being configured * @param protocols the protocols in descending order of preference. If empty, no protocol * indications will be used. This array will be copied. * @throws IllegalArgumentException - if protocols is null, or if any element in a non-empty * array is null or an empty (zero-length) string */ public static void setApplicationProtocols(SSLSocket socket, String[] protocols) { toConscrypt(socket).setApplicationProtocols(protocols); }