StateChange Method
      
 

Description

Called when wodVPN changes its state.

Return Type

None  

Syntax

object.StateChange Owner, OldState

The StateChange Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type IwodVPNNotify.
OwnerA wodVPNCom object. Reference to the wodVPNCom instance that called this notification method.
OldStateA StatesEnum enumeration, as described in settings. Holds previous state value.

Settings

The settings for OldState are:

ConstantValueDescription
 Disconnected0Disconnected from remote peer.
 Listening1Listening for incoming connections.
 Searching2Searching for remote peer.
 Linking3Linking with remote peer (trying to find UDP hole).
 Connecting4Connecting with remote peer.
 Disconnecting5Disconnecting from remote peer.
 Connected6Connected to remote peer.

Remarks

This method is called only if you have implemented the IwodVPNNotify interface in your application and the wodVPN1.Notification property has received a reference to an instance of your implementation.

StateChange notification method is called each time wodVPN changes its internal state. Initially it is set to Disconnected, but as you call wodVPN's methods it will be changed to Listening, Connecting etc..

Using this notification method you can determine whether there is anything happening with wodVPN. You can access current state using State property.