From: Saverio Proto Date: Thu, 28 Aug 2014 13:17:15 +0000 (+0200) Subject: manynodes: implement stop command X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=64f243ffc7f01bfa3a0980fb0f92106224676f06;p=meshlink manynodes: implement stop command --- diff --git a/examples/manynodes.c b/examples/manynodes.c index 7b23fc51..16d25ddc 100644 --- a/examples/manynodes.c +++ b/examples/manynodes.c @@ -257,7 +257,8 @@ static void parse_command(char *buf) { } nodeindex = atoi(arg); printf("Index is now %d\n",nodeindex); - + } else if(!strcasecmp(buf, "stop")) { + meshlink_stop(mesh[nodeindex]); } else if(!strcasecmp(buf, "quit")) { printf("Bye!\n"); fclose(stdin); @@ -273,6 +274,7 @@ static void parse_command(char *buf) { "/eg Export graph as json file.\n" "/test Test functionality sending some data to all nodes\n" "/select Select the active node running the user commands\n" + "/stop Call meshlink_stop, use /select first to select which node to stop\n" "/quit Exit this program.\n" ); } else {