diff --git a/README.md b/README.md index fed47d0..c9eb6d9 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,5 @@ Example usage of v4 : - [X] server can handle multiple requests simultaneously - [X] server doesn't stop after the connection ends - [X] both client and server can assume sender/receiver roles + +Every version is fully functional. diff --git a/tsock_v1.c b/tsock_v1.c index f164b41..f60ba59 100644 --- a/tsock_v1.c +++ b/tsock_v1.c @@ -72,7 +72,8 @@ int main (int argc, char **argv) { char* message = malloc(BASE_SIZE * sizeof(char)); - if (source == -1) { + // At least one option -s or -u required. UDP is also required for this version. + if (source == -1 || !udp) { print_usage(argv[0]); exit(1) ; } @@ -95,7 +96,7 @@ int main (int argc, char **argv) { nb_message = 10 ; printf("nb de tampons à envoyer = 10 par défaut\n"); } else - printf("nb de tampons à envoyer = infini\n"); + printf("nb de tampons à recevoir = infini\n"); } if (udp==1){ diff --git a/tsock_v2.c b/tsock_v2.c index bb381d8..1c4d2c0 100644 --- a/tsock_v2.c +++ b/tsock_v2.c @@ -92,7 +92,7 @@ int main (int argc, char **argv) { nb_message = 10 ; printf("nb de tampons à envoyer = 10 par défaut\n"); } else - printf("nb de tampons à envoyer = infini\n"); + printf("nb de tampons à recevoir = infini\n"); } if (udp==1){