SSLCertificateSocketFactory.SetHostname(Socket, 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.
Turns on Server Name Indication (SNI) on a given socket.
[Android.Runtime.Register("setHostname", "(Ljava/net/Socket;Ljava/lang/String;)V", "GetSetHostname_Ljava_net_Socket_Ljava_lang_String_Handler")]
public virtual void SetHostname (Java.Net.Socket? socket, string? hostName);
[<Android.Runtime.Register("setHostname", "(Ljava/net/Socket;Ljava/lang/String;)V", "GetSetHostname_Ljava_net_Socket_Ljava_lang_String_Handler")>]
abstract member SetHostname : Java.Net.Socket * string -> unit
override this.SetHostname : Java.Net.Socket * string -> unit
Parameters
- socket
- Socket
a socket created by this factory.
- hostName
- String
the desired SNI hostname, null to disable.
- Attributes
Exceptions
if the socket was not created by this factory.
Remarks
Turns on Server Name Indication (SNI) on a given socket.
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.