SearchDone Event
    
 

Description

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

Syntax

Private Sub object_SearchDone(IP, Port, ErrorCode, ErrorText)

The SearchDone Event syntax has these parts:

PartDescription
objectA wodVPN object.
IP A String value. IP address of remote peer.
Port A Long value. UDP port of remote peer where packets are exchanged.
ErrorCode A Long value. Error number that occurred. 0 if none.
ErrorText A String value. Text description of the error.

Remarks

SearchDone event is fired after Search method was called, 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

wodVPN1.Connect IP, Port

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