Taal

VpnService.Builder.AddAddress Method

Definition

Overloads

Name Description
AddAddress(InetAddress, Int32)

Add a network address to the VPN interface.

AddAddress(String, Int32)

Convenience method to add a network address to the VPN interface using a numeric address string.

AddAddress(InetAddress, Int32)

Add a network address to the VPN interface.

[Android.Runtime.Register("addAddress", "(Ljava/net/InetAddress;I)Landroid/net/VpnService$Builder;", "GetAddAddress_Ljava_net_InetAddress_IHandler")]
public virtual Android.Net.VpnService.Builder AddAddress(Java.Net.InetAddress address, int prefixLength);
[<Android.Runtime.Register("addAddress", "(Ljava/net/InetAddress;I)Landroid/net/VpnService$Builder;", "GetAddAddress_Ljava_net_InetAddress_IHandler")>]
abstract member AddAddress : Java.Net.InetAddress * int -> Android.Net.VpnService.Builder
override this.AddAddress : Java.Net.InetAddress * int -> Android.Net.VpnService.Builder

Parameters

address
InetAddress

The IPv4 or IPv6 interface address.

prefixLength
Int32

The number of bits in the interface address's network prefix.

Returns

This VPN builder with the interface address added.

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.addAddress(java.net.InetAddress, int).

Applies to

AddAddress(String, Int32)

Convenience method to add a network address to the VPN interface using a numeric address string.

[Android.Runtime.Register("addAddress", "(Ljava/lang/String;I)Landroid/net/VpnService$Builder;", "GetAddAddress_Ljava_lang_String_IHandler")]
public virtual Android.Net.VpnService.Builder AddAddress(string address, int prefixLength);
[<Android.Runtime.Register("addAddress", "(Ljava/lang/String;I)Landroid/net/VpnService$Builder;", "GetAddAddress_Ljava_lang_String_IHandler")>]
abstract member AddAddress : string * int -> Android.Net.VpnService.Builder
override this.AddAddress : string * int -> Android.Net.VpnService.Builder

Parameters

address
String

The IPv4 or IPv6 interface address in numeric string form.

prefixLength
Int32

The number of bits in the interface address's network prefix.

Returns

This VPN builder with the interface address added.

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.addAddress(java.lang.String, int).

See also

  • <xref:Android.Net.VpnService.Builder.AddAddress(Java.Net.InetAddress%2c+System.Int32)>

Applies to