summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-06-02 15:33:57 +0200
committerOskar <[email protected]>2024-06-02 15:33:57 +0200
commit8b80185d9db97a5e8e93f763a4c190183317f44f (patch)
tree7de30957d9f0458dd8df02ffe7d6299e3b895499 /client.c
parent54b7f4b1d69673182c1358d484b35e86111b66be (diff)
made new file for dumb client, because i will make a slightly smarter one that doesnt just send a message and exit
Diffstat (limited to 'client.c')
-rw-r--r--client.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/client.c b/client.c
index 3ace3ac..e023465 100644
--- a/client.c
+++ b/client.c
@@ -50,11 +50,18 @@ int main () {
}
}
- if (connect_result == -1 || sockfd == -1) { exit(__FAIL); }
+ if (connect_result == -1 || sockfd == -1) {
+ exit(__FAIL);
+ }
+
char *msg = "Client says hello!\n";
size_t len = strlen(msg);
- send(sockfd, msg, len, 0);
+
+ for (int i = 0 ; i < 10 ; i++) {
+
+ send(sockfd, msg, len, 0);
+ }
freeaddrinfo(res);
return 0;
}