distinction between father and son
This commit is contained in:
parent
183cf993e4
commit
5138fe9a4c
1 changed files with 2 additions and 1 deletions
|
@ -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++) {
|
||||||
|
|
Loading…
Reference in a new issue