Start Method
      
 

Description

Starts accepting packets.

Return Type

A Long value.  

Syntax

object.Start (Type, Port)

The Start Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type VPNMediator.
TypeRequired. A SearchEnum enumeration, as described in settings.
PortRequired. A Long value. UDP port where will mediator listen for incoming search requests.

Settings

The settings for Type are:

ConstantValueDescription
 SrchUDPSingle0Search using single UDP request.
 SrchUDPDouble1Search using double UDP request.
 SrchNetInfo2Search using provided remote details.

Remarks

Start method will start your mediator on predefined port, and will wait for incoming packets. When new packet arrives, MediatorConnected event will fire with details on peer that searches for other peer. Once both peers connect, MediatorExchangeData event is fired notifying you that packet is sent back to the peer that searched for them. When peer stops sending packets to the mediator, MediatorDisconnected event will be fired.

Please note that currently mediator only works with UDP packets. When peers search for other peers, they send packet after packet (in predefined interval, for predefined time) until they receive response - or until peer's timeouts expire.