Language

VpnService.Builder.AddDnsServer Method

Definition

Overloads

Name Description
AddDnsServer(InetAddress)

Add a DNS server to the VPN connection.

AddDnsServer(String)

Convenience method to add a DNS server to the VPN connection using a numeric address string.

AddDnsServer(InetAddress)

Add a DNS server to the VPN connection.

[Android.Runtime.Register("addDnsServer", "(Ljava/net/InetAddress;)Landroid/net/VpnService$Builder;", "GetAddDnsServer_Ljava_net_InetAddress_Handler")]
public virtual Android.Net.VpnService.Builder AddDnsServer(Java.Net.InetAddress address);
[<Android.Runtime.Register("addDnsServer", "(Ljava/net/InetAddress;)Landroid/net/VpnService$Builder;", "GetAddDnsServer_Ljava_net_InetAddress_Handler")>]
abstract member AddDnsServer : Java.Net.InetAddress -> Android.Net.VpnService.Builder
override this.AddDnsServer : Java.Net.InetAddress -> Android.Net.VpnService.Builder

Parameters

address
InetAddress

Returns

Attributes

Exceptions

if the address is invalid.

Remarks

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.

Java documentation for android.net.VpnService.Builder.addDnsServer(java.net.InetAddress).

Applies to

AddDnsServer(String)

Convenience method to add a DNS server to the VPN connection using a numeric address string.

[Android.Runtime.Register("addDnsServer", "(Ljava/lang/String;)Landroid/net/VpnService$Builder;", "GetAddDnsServer_Ljava_lang_String_Handler")]
public virtual Android.Net.VpnService.Builder AddDnsServer(string address);
[<Android.Runtime.Register("addDnsServer", "(Ljava/lang/String;)Landroid/net/VpnService$Builder;", "GetAddDnsServer_Ljava_lang_String_Handler")>]
abstract member AddDnsServer : string -> Android.Net.VpnService.Builder
override this.AddDnsServer : string -> Android.Net.VpnService.Builder

Parameters

address
String

Returns

Attributes

Exceptions

if the address is invalid.

Remarks

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.

Java documentation for android.net.VpnService.Builder.addDnsServer(java.lang.String).

See also

Applies to