Back to product page

VPNAdapter function


Returns reference to specific virtual network adapter.

Syntax

  • C++
CVPNInterface *VPNAdapter(int index);
The VPNAdapter(index) syntax has these parts:
indexInteger. Index number of the interface.
Return valueReference to the VPNInterface object.

Remarks

VPNAdapter will return reference to virtual network driver instances that are available to use by devP2P. You can get total number of interfaces using VPNAdapterCount function.

You can share same instance of VPNAdapter between several devP2P instances, since it's needed to property route packets to more than one remote peer.

Platforms

Windows
Mac OSX
Linux
BSD