10 void NetTest_Suite_Cmdline(void)
13 Cmdline_Backend_StartThread();
14 while( fgets(line, sizeof(line)-1, stdin) )
16 const char *const sep = " \n\r";
17 const char *cmd = strtok(line, sep);
20 if( strcmp(cmd, "exit") == 0 ) {
23 else if( strcmp(cmd, "tcp_echo_server") == 0 ) {
24 const char *port_str = strtok(NULL, sep);
26 int port = strtol(port_str, &end, 0);
28 fprintf(stderr, "ERROR: Port number '%s' not valid\n", port_str);
32 Cmdline_Backend_StartEchoServer(port);
33 // TODO: Allow stopping of the server?
36 fprintf(stderr, "ERROR: Unknown command '%s'\n", cmd);
40 // TODO: Tear down backend?