Back to product page

SetAdapter method


Sets adapter to be used with devVPN.

Type

Integer.

Syntax

  • C++
int SetAdapter(CVPNInterface *adapter);
The SetAdapter(adapter) syntax has these parts:
adapterReference to CVPNinterface object, returned by VPNAdapter function.
Return value0 (ErrorNone) if success, otherwise negative value from Errors enumeration.

Remarks

Before Start method is called, you must use SetAdapter to choose which adapter will be used to forward network traffic between your and remote peers. It must have valid IP and Netmask, and all peers will also need to have IP address in same network range (defined by Netmask) in order to successfully route network packets.


Platforms

Windows
Mac OSX
Linux
BSD
iPhone IOS