summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroskar <[email protected]>2024-05-23 20:10:40 +0200
committeroskar <[email protected]>2024-05-23 20:10:40 +0200
commit9e4384374d3c8574cfc9d1e6586386b981dcbb64 (patch)
treef3548484df1236f01e498ba319c1baa2e39a4948
parent330c22b13e46f3ba51d5c2775235da2276dca8a0 (diff)
slight change
-rw-r--r--listen.c5
1 files 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);