summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);