removed identities, network conf files, most name references

This commit is contained in:
Joseph Henry
2016-07-18 17:08:27 -07:00
parent ff808f7629
commit 3047a901f5
7 changed files with 11 additions and 36 deletions

View File

@@ -222,7 +222,7 @@ public class ZeroTierSockets_Demo : MonoBehaviour
GameObject go; GameObject go;
go = GameObject.Find ("inputNetworkID"); go = GameObject.Find ("inputNetworkID");
input = go.GetComponents<InputField> () [0]; input = go.GetComponents<InputField> () [0];
input.text = "565799d8f65063e5"; input.text = "XXXXXXXXXXXXXXXX";
go = GameObject.Find ("inputServerAddress"); go = GameObject.Find ("inputServerAddress");
input = go.GetComponents<InputField> () [0]; input = go.GetComponents<InputField> () [0];
input.text = "10.9.9.203"; input.text = "10.9.9.203";
@@ -234,7 +234,7 @@ public class ZeroTierSockets_Demo : MonoBehaviour
input.text = "Welcome to the machine"; input.text = "Welcome to the machine";
// Create new instance of ZeroTier in separate thread // Create new instance of ZeroTier in separate thread
zt = new ZeroTierNetworkInterface ("/Users/Joseph/utest3", "565799d8f65063e5"); zt = new ZeroTierNetworkInterface ("/Users/ztest", "XXXXXXXXXXXXXXXX");
} }
// Terminate the ZeroTier service when the application quits // Terminate the ZeroTier service when the application quits

View File

@@ -32,45 +32,21 @@ public class MainActivity extends AppCompatActivity {
Log.d("SDK", "Starting service...\n"); Log.d("SDK", "Starting service...\n");
while(!zt.isRunning()) { } while(!zt.isRunning()) { }
Log.d("SDK","Joining network...\n"); Log.d("SDK","Joining network...\n");
zt.joinNetwork("565799d8f65063e5"); zt.joinNetwork("XXXXXXXXXXXXXXXX");
/*
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
//Do something after 100ms
}
}, 10000);
*/
// Create ZeroTier socket // Create ZeroTier socket
Log.d("","ztjniSocket()\n"); Log.d("","ztjniSocket()\n");
int sock = zt.ztjniSocket(zt.AF_INET, zt.SOCK_STREAM, 0); int sock = zt.ztjniSocket(zt.AF_INET, zt.SOCK_STREAM, 0);
Log.d("", "ztjniSocket() = " + sock + "\n"); Log.d("", "ztjniSocket() = " + sock + "\n");
try {
// Construct remote host address Thread.sleep(10000);
//InetAddress addr = InetAddress.getByName("10.144.211.245");
//int port = 8080;
//SocketAddress sockaddr = new InetSocketAddress(addr, port);
try
{
Thread.sleep(15000);
}
catch(java.lang.InterruptedException e)
{
} }
catch(java.lang.InterruptedException e) { }
// Connect to remote host // Connect to remote host
Log.d("","ztjniConnect()\n"); Log.d("","ztjniConnect()\n");
int err = zt.ztjniConnect(sock, "10.9.9.203", 8080); int err = zt.ztjniConnect(sock, "10.9.9.203", 8080);
Log.d("", "ztjniConnect() = " + err + "\n");
// Set up example proxy connection to SDK proxy server // Set up example proxy connection to SDK proxy server
/* /*

View File

@@ -272,9 +272,9 @@ class ViewController: NSViewController {
var service_thread : NSThread! var service_thread : NSThread!
func ztnc_start_service() { func ztnc_start_service() {
// If you plan on using SOCKS Proxy, you don't need to initialize the RPC // If you plan on using SOCKS Proxy, you don't need to initialize the RPC
//start_service("/Users/Joseph/utest3") //start_service("/Users/ztest")
// If you plan on using direct calls via RPC // If you plan on using direct calls via RPC
start_service_and_rpc("/Users/Joseph/utest3","565799d8f65063e5"); start_service_and_rpc("/Users/ztest","XXXXXXXXXXXXXXXX");
} }
@@ -284,7 +284,7 @@ class ViewController: NSViewController {
// Set initial UI values for demo // Set initial UI values for demo
txtAddr.stringValue = serverAddr txtAddr.stringValue = serverAddr
txtPort.intValue = serverPort txtPort.intValue = serverPort
txtNWID.stringValue = "565799d8f65063e5" txtNWID.stringValue = "XXXXXXXXXXXXXXXX"
// ZeroTier Service thread // ZeroTier Service thread
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), {

View File

@@ -216,13 +216,13 @@ class ViewController: UIViewController {
var service_thread : NSThread! var service_thread : NSThread!
func ztnc_start_service() { func ztnc_start_service() {
let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true) let path = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true)
start_service_and_rpc(path[0],"565799d8f65063e5") start_service_and_rpc(path[0],"XXXXXXXXXXXXXXXX")
} }
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
txtNWID.text = "565799d8f65063e5" txtNWID.text = "XXXXXXXXXXXXXXXX"
txtTX.text = "welcome to the machine" txtTX.text = "welcome to the machine"
txtAddr.text = "0.0.0.0" txtAddr.text = "0.0.0.0"
serverAddr = "0.0.0.0" serverAddr = "0.0.0.0"

View File

@@ -218,7 +218,6 @@ void zt_init_rpc(const char * path, const char * nwid);
specific data directory given by getApplicationContext().getFilesDir() */ specific data directory given by getApplicationContext().getFilesDir() */
//rpcDir = homeDir; // Take given homeDir as rpcDir //rpcDir = homeDir; // Take given homeDir as rpcDir
//homeDir = "/sdcard/zerotier"; // Use fat32-formatted sdcard for writing network conf & supporting files //homeDir = "/sdcard/zerotier"; // Use fat32-formatted sdcard for writing network conf & supporting files
//join_network("565799d8f65063e5");
#endif #endif
#if defined(__APPLE__) && !defined(__IOS__) #if defined(__APPLE__) && !defined(__IOS__)