diff options
author | Oskar <[email protected]> | 2024-06-03 17:33:47 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-06-03 17:33:47 +0200 |
commit | 9d15452d00945770b8f297daed2e5f030f419202 (patch) | |
tree | af1b2264c9231e9eadbe0c18906ad08a8d79bc7b /client.c | |
parent | cf86eea3ef47ce4444b99edff866a7d9836bd763 (diff) |
made it so the client can keep accepting new connections
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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, ": "); |