SearchDone Method
      
 

Description

Called when Search method completes its search for remote wodVPN peer.

Return Type

None  

Syntax

object.SearchDone Owner, IP, Port, ErrorCode, ErrorText

The SearchDone Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type IwodVPNNotify.
Owner A wodVPNCom object. Reference to the wodVPNCom instance that called this notification method.
IPA String value. IP address of remote peer.
PortA Long value. UDP port of remote peer where packets are exchanged.
ErrorCodeA Long value. Error number that occurred. 0 if none.
ErrorTextA String value. Text description of the error.

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.

SearchDone notification method will be called after you call Search method, and wodVPN finishes it search for remote peer. At this time this can be successful search (ErrorCode set to 0), or some error may have been occurred.

Even search was successful, it doesn't mean you're yet connected to remote wodVPN. At this point you have enough information to initiate connection using Connect method - and you should do so within next few minutes otherwise IP/Port may become invalid (since your router can release his NAT translation table).

Typically, you will have basic code inside this event, such as

VPN1.Connect IP, Port

but you MUST have code similar to above in your SearchDone method.