|
|
@ -70,7 +70,7 @@ void traite_connexion(int *sfd){
|
|
|
|
if (write(new_sfd, buf, nread) != nread){
|
|
|
|
if (write(new_sfd, buf, nread) != nread){
|
|
|
|
fprintf(stderr, "Erreur d'envoi de la reponse\n");
|
|
|
|
fprintf(stderr, "Erreur d'envoi de la reponse\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
close(new_sfd);
|
|
|
|
close(new_sfd); /* ferme la connexion */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
else{
|
|
|
|
fprintf(stderr, "getnameinfo: %s\n", gai_strerror(s));
|
|
|
|
fprintf(stderr, "getnameinfo: %s\n", gai_strerror(s));
|
|
|
@ -101,5 +101,4 @@ int main(int argc, char *argv[]){
|
|
|
|
con_client(&sfd); /* connexion au client */
|
|
|
|
con_client(&sfd); /* connexion au client */
|
|
|
|
|
|
|
|
|
|
|
|
traite_connexion(&sfd);
|
|
|
|
traite_connexion(&sfd);
|
|
|
|
printf("traite_connexion ok\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|