SSLParameters.SetApplicationProtocols(String[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the prioritized array of application-layer protocol names that can be negotiated over the SSL/TLS protocols.
[Android.Runtime.Register("setApplicationProtocols", "([Ljava/lang/String;)V", "GetSetApplicationProtocols_arrayLjava_lang_String_Handler", ApiSince=29)]
public virtual void SetApplicationProtocols (string[]? protocols);
[<Android.Runtime.Register("setApplicationProtocols", "([Ljava/lang/String;)V", "GetSetApplicationProtocols_arrayLjava_lang_String_Handler", ApiSince=29)>]
abstract member SetApplicationProtocols : string[] -> unit
override this.SetApplicationProtocols : string[] -> unit
Parameters
- protocols
- String[]
an ordered array of application protocols,
with protocols[0]
being the most preferred.
If the array is empty (zero-length), protocol
indications will not be used.
- Attributes
Remarks
Sets the prioritized array of application-layer protocol names that can be negotiated over the SSL/TLS protocols.
If application-layer protocols are supported by the underlying SSL/TLS implementation, this method configures which values can be negotiated by protocols such as RFC 7301 , the Application Layer Protocol Negotiation (ALPN).
If this end of the connection is expected to offer application protocol values, all protocols configured by this method will be sent to the peer.
If this end of the connection is expected to select the application protocol value, the protocols
configured by this method are compared with those sent by the peer. The first matched value becomes the negotiated value. If none of the protocols
were actually requested by the peer, the underlying protocol will determine what action to take. (For example, ALPN will send a "no_application_protocol"
alert and terminate the connection.)
Added in 9.
Java documentation for javax.net.ssl.SSLParameters.setApplicationProtocols(java.lang.String[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.