SNIHostName.CreateSNIMatcher(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.
Creates an SNIMatcher
object for SNIHostName
s.
[Android.Runtime.Register("createSNIMatcher", "(Ljava/lang/String;)Ljavax/net/ssl/SNIMatcher;", "", ApiSince=24)]
public static Javax.Net.Ssl.SNIMatcher? CreateSNIMatcher (string? regex);
[<Android.Runtime.Register("createSNIMatcher", "(Ljava/lang/String;)Ljavax/net/ssl/SNIMatcher;", "", ApiSince=24)>]
static member CreateSNIMatcher : string -> Javax.Net.Ssl.SNIMatcher
Parameters
- regex
- String
the regular expression pattern representing the hostname(s) to match
Returns
a SNIMatcher
object for SNIHostName
s
- Attributes
Remarks
Creates an SNIMatcher
object for SNIHostName
s.
This method can be used by a server to verify the acceptable SNIHostName
s. For example,
SNIMatcher matcher =
SNIHostName.createSNIMatcher("www\\.example\\.com");
will accept the hostname "www.example.com".
SNIMatcher matcher =
SNIHostName.createSNIMatcher("www\\.example\\.(com|org)");
will accept hostnames "www.example.com" and "www.example.org".
Java documentation for javax.net.ssl.SNIHostName.createSNIMatcher(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.