diff options
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -87,13 +87,11 @@ int main(int argc, char *argv[]) freeaddrinfo(servinfo); // all done with this structure + // sleep(1); + pthread_t reply_thread; pthread_create(&reply_thread, NULL, reply_thread_routine, (void*)sockfd); - usleep(1000); - - // sleep(1); - struct Hello hello; hello.commandType = 0; // convert updPort to an int @@ -107,8 +105,6 @@ int main(int argc, char *argv[]) // CONSIDER: could recieve the welcome message here char input[LINE_MAX]; - printf("Enter a number to change to it's station. Click q to end stream.\n"); - fflush(stdout); while (1) { char *line = fgets(input, LINE_MAX, stdin); @@ -160,6 +156,7 @@ void *reply_thread_routine(void* args) { } num_stations = ntohs(num_stations); printf("Welcome to Snowcast! The server has %d stations.\n", num_stations); + printf("Enter a number to change to it's station. Click q to end stream.\n"); continue; } |