aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2023-09-15 01:10:57 -0400
committersotech117 <michael_foiani@brown.edu>2023-09-15 01:10:57 -0400
commitcbfafaabbd846e625796f275b2e843376385cc36 (patch)
tree3f3f59aa8ce02e3b11a097d0b6ef651bbb3db2b0 /server.c
parent003c34172ffa9c8256a3ec4db913c53c825c6c9f (diff)
work on server handling multiple clients with a fd set
Diffstat (limited to 'server.c')
-rw-r--r--server.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/server.c b/server.c
index 475535c..be9f603 100644
--- a/server.c
+++ b/server.c
@@ -118,6 +118,8 @@ int main(int argc, char *argv[])
printf("server: waiting for connections...\n");
+
+
while(1) { // main accept() loop
sin_size = sizeof their_addr;
new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);