RelayDisconnected Event
    
 

Description

Fires after UDP relay detects inactive peer.

Syntax

Private Sub object_RelayDisconnected(Relay, IP, Port, ID)

The RelayDisconnected Event syntax has these parts:

PartDescription
objectA wodVPN object.
RelayA VPNRelay object. Reference to relay that is disconnected.
IPA String value. IP address where peer is coming from.
PortA Long value. Port peer is coming from
IDA String value. ID set by the peer, if known.

Remarks

RelayDisconnected event will fire when no packets are received from one of the peers for several seconds, as it is defined in Timeout property. When Timeout property is set to 0, this event never fires since peers are not auto-disconnected.

Once peer is auto disconnected, we suggest you close the relay, or wait for other peer to leave too (he will since he will not receive packets from another peer) since other peer may be left in unknown state.