From 1f810c707ef50ad00f6d5270de124426bfa1b9ba Mon Sep 17 00:00:00 2001 From: Dane MacFadden Date: Thu, 10 Jul 2025 19:29:43 -0600 Subject: [PATCH] created threads --- main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 2a9fb1a..a2faa9e 100644 --- a/main.c +++ b/main.c @@ -211,8 +211,14 @@ int main(int argc, char* argv[]) { } printf("Connected!\n"); } - pthread_create(&input_thread, NULL, input, (void*) msg); - pthread_join(input_thread, NULL); + pthread_create(&input_thread, NULL, input, NULL); + pthread_create(&send_thread, NULL, sender, NULL); + pthread_create(&receive_thread, NULL, receiver, NULL); + pthread_create(&output_thread, NULL, output, NULL); + pthread_join(input_thread, NULL); + pthread_join(send_thread, NULL); + pthread_join(receive_thread, NULL); + pthread_join(output_thread, NULL); close(sockfd); close(confd);