diff options
| author | System Administrator <[email protected]> | 2016-07-17 20:56:42 -0700 |
|---|---|---|
| committer | System Administrator <[email protected]> | 2016-07-17 20:56:42 -0700 |
| commit | 2393cd63673547e5e699b9044bf99b69ea5b1e9e (patch) | |
| tree | 9dea6203dcef09d24ac19945d3a1ae8f05ea6ab9 /src/SDK_XcodeWrapper.cpp | |
| parent | 87ffdcfd3d40d1985c8e52381f5202ea684d9511 (diff) | |
path trickery update, direct-call API bugfix
Diffstat (limited to 'src/SDK_XcodeWrapper.cpp')
| -rwxr-xr-x | src/SDK_XcodeWrapper.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/SDK_XcodeWrapper.cpp b/src/SDK_XcodeWrapper.cpp index 326845d..cf1aab4 100755 --- a/src/SDK_XcodeWrapper.cpp +++ b/src/SDK_XcodeWrapper.cpp @@ -17,10 +17,17 @@ #include "SDK_ServiceSetup.hpp" // Starts a ZeroTier service at the specified path +// This will only support SOCKS5 Proxy extern "C" void start_service(const char * path) { init_service(INTERCEPT_DISABLED, path); } +// Starts a ZeroTier service at the specified path and initializes the RPC mechanism +// This will allow direct API calls +extern "C" void start_service_and_rpc(const char * path, const char * nwid) { + init_service_and_rpc(INTERCEPT_DISABLED, path, nwid); +} + // Joins a ZeroTier virtual network extern "C" void zt_join_network(const char * nwid){ join_network(nwid); @@ -32,9 +39,13 @@ extern "C" void zt_leave_network(const char * nwid){ } // Explicit ZT API wrappers -extern "C" void zts_init_rpc(const char *path, const char *nwid) { - zt_init_rpc(path, nwid); -} +#if !defined(__IOS__) + // This isn't available for iOS since function interposition isn't as reliable + extern "C" void zts_init_rpc(const char *path, const char *nwid) { + zt_init_rpc(path, nwid); + } +#endif + extern "C" int zts_socket(SOCKET_SIG) { return zt_socket(socket_family, socket_type, protocol); } |
