distinction between father and son

This commit is contained in:
nbillard 2023-02-13 09:38:24 +01:00
parent 183cf993e4
commit 5138fe9a4c

View file

@ -392,7 +392,7 @@ int main (int argc, char **argv) {
exit(1); exit(1);
} }
while (1) { while (sock != 0) {
//acceptation d'une demande de connexion //acceptation d'une demande de connexion
if((sock_bis=accept(sock,(struct sockaddr *)&adr_em, &lg_adr_em)) == -1) { if((sock_bis=accept(sock,(struct sockaddr *)&adr_em, &lg_adr_em)) == -1) {
@ -409,6 +409,7 @@ int main (int argc, char **argv) {
break; break;
case 0: case 0:
close(sock); close(sock);
sock = 0;
if (source == 1) { if (source == 1) {
//envoi //envoi
for(i=0; i<nb_message; i++) { for(i=0; i<nb_message; i++) {