summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-06-03 17:33:47 +0200
committerOskar <[email protected]>2024-06-03 17:33:47 +0200
commit9d15452d00945770b8f297daed2e5f030f419202 (patch)
treeaf1b2264c9231e9eadbe0c18906ad08a8d79bc7b /client.c
parentcf86eea3ef47ce4444b99edff866a7d9836bd763 (diff)
made it so the client can keep accepting new connections
Diffstat (limited to 'client.c')
-rw-r--r--client.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/client.c b/client.c
index d0ef45f..eac217c 100644
--- a/client.c
+++ b/client.c
@@ -21,7 +21,13 @@ int sockfd = -1;
size_t bytes_sent = 0;
void talk_to_server (int sockfd) {
-
+
+ fprintf(stdout, "Waiting to connect...\n");
+ int rcv_ret;
+ char buf_connected[11];
+ rcv_ret = recv(sockfd, buf_connected, 11, 0);
+ buf_connected[rcv_ret] = '\0';
+ fprintf(stdout, "%s", buf_connected);
while (1) {
char editbuffer[BUF_SZ_2];
fprintf(stdout, ": ");