
PeerConnecting event
Fires when remote peer wants to connect.
Type
Boolean value.Syntax
- C++
bool PeerConnecting(CVPN *vpn, CP2P *p2p, char *peerName, char *peerAddrs);
The PeerConnecting(vpn,p2p,peerName,peerAddrs) syntax has these parts:
The PeerConnecting(vpn,p2p,peerName,peerAddrs) syntax has these parts:
vpn | Pointer to devVPN instance that fired the event. |
p2p | Pointer to devP2P instance that wants to connect. |
peerName | Name of the peer that wants to connect. |
peerAddrs | Virtual IP address of the peer that you can use to access the peer. |
Return value | Return True if you accept the connection with the peer. |
Remarks
After Search method is called, and mediator finds a match, this event will be fired so you can decide if you want to connect with this peer. If you want to connect, return True, and connection will be accepted.After connection is (successfully) established, PeerConnected event will be fired.
To use this event, you should implement function by yourself in the code (based on function declaration), and set devVPN.Events.PeerConnecting structure member to point to your function.
Platforms
WindowsMac OSX
Linux
BSD
iPhone IOS