diff options
author | sotech117 <michael_foiani@brown.edu> | 2023-09-23 21:55:05 +0000 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2023-09-23 21:55:05 +0000 |
commit | c9b0771b8052039106ccf6346b8d39c8a8167622 (patch) | |
tree | 921b80a0f6cd18502ca0ae21bb592ecbf6a1bb7e /client.c | |
parent | 236b54df92a81f71db95e76141660a69fa1079e2 (diff) |
print command line prompt after welcome is received
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; } |