From 9e4384374d3c8574cfc9d1e6586386b981dcbb64 Mon Sep 17 00:00:00 2001 From: oskar Date: Thu, 23 May 2024 20:10:40 +0200 Subject: slight change --- listen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/listen.c b/listen.c index 8557a60..b6b4e36 100644 --- a/listen.c +++ b/listen.c @@ -62,7 +62,7 @@ int main () { len = strlen(msg); bytes_sent = send(newfd, msg, len, 0); - int rlen = 1000; + size_t rlen = 1024; int recv_ret; size_t bytes_recieved = 0; while(true) { @@ -75,7 +75,8 @@ int main () { } recvmsg[recv_ret] = '\0'; fprintf(stdout, "%s", recvmsg); - memset(&recvmsg, 0, (size_t)rlen); + //fprintf(stdout, "loop"); + memset(&recvmsg, 0, rlen); } fprintf(stdout, "bytes recieved: %ld\nbytes sent: %d\n", bytes_recieved, bytes_sent); -- cgit v1.2.3