diff options
author | oskar <[email protected]> | 2024-05-23 20:10:40 +0200 |
---|---|---|
committer | oskar <[email protected]> | 2024-05-23 20:10:40 +0200 |
commit | 9e4384374d3c8574cfc9d1e6586386b981dcbb64 (patch) | |
tree | f3548484df1236f01e498ba319c1baa2e39a4948 /listen.c | |
parent | 330c22b13e46f3ba51d5c2775235da2276dca8a0 (diff) |
slight change
Diffstat (limited to 'listen.c')
-rw-r--r-- | listen.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |