Compartilhar via


IChildSessionCallback.OnIpSecTransformCreated(IpSecTransform, Int32) Method

Definition

Called when an IpSecTransform is created by this Child Session.

[Android.Runtime.Register("onIpSecTransformCreated", "(Landroid/net/IpSecTransform;I)V", "GetOnIpSecTransformCreated_Landroid_net_IpSecTransform_IHandler:Android.Net.IpSec.Ike.IChildSessionCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)]
public void OnIpSecTransformCreated (Android.Net.IpSecTransform ipSecTransform, int direction);
[<Android.Runtime.Register("onIpSecTransformCreated", "(Landroid/net/IpSecTransform;I)V", "GetOnIpSecTransformCreated_Landroid_net_IpSecTransform_IHandler:Android.Net.IpSec.Ike.IChildSessionCallbackInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)>]
abstract member OnIpSecTransformCreated : Android.Net.IpSecTransform * int -> unit

Parameters

ipSecTransform
IpSecTransform

the created IpSecTransform.

direction
Int32

the direction of this IpSecTransform.

Attributes

Remarks

Called when an IpSecTransform is created by this Child Session.

This method is fired when a Child Session is created or rekeyed.

The IpSecTransform must be applied to relevant sockets or interfaces when this method is called; traffic may otherwise flow over the socket or interface unprotected.

As this method is fired on an executor, there is an inherent race condition during rekeys where traffic may be routed through the old transforms while the remote has switched to using the new set of transforms.

To avoid the initial startup race condition where the transforms have not yet been applied, the #onOpened(ChildSessionConfiguration) callback should be used as the authoritative signal that the socket or tunnel is ready, as it is fired after both transforms have had a chance to be applied.

Java documentation for android.net.ipsec.ike.ChildSessionCallback.onIpSecTransformCreated(android.net.IpSecTransform, int).

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.

Applies to