Back to product page

PeerConnected event


Fires when new peer is successfully connected.

Syntax

  • C++
void PeerConnected(CVPN *vpn, CP2P *p2p, char *address, int port);
The PeerConnected(vpn,p2p,address,port) syntax has these parts:
vpnPointer to devVPN instance that fired the event.
p2pPointer to devP2P instance that is connected.
addressString that contains real IP address of the peer.
portInteger that contains port of the peer.

Remarks

This event is fired after connection with the peer is successfully established. You can now access the peer through his virtual IP address.

To use this event, you should implement function by yourself in the code (based on function declaration), and set devVPN.Events.PeerConnected structure member to point to your function.

Platforms

Windows
Mac OSX
Linux
BSD
iPhone IOS