Passer une socket de non bloquant à bloquante

Fermé
kididouille - 11 déc. 2008 à 11:24
Char Snipeur Messages postés 9696 Date d'inscription vendredi 23 avril 2004 Statut Contributeur Dernière intervention 3 octobre 2023 - 11 déc. 2008 à 12:42
Bonjour,
je suis sous QNX
je cherche à faire passer une socket de l'état non bloquante à bloquante.
j'ai besoin au debut de mon programme qu'elle soit non bloquante mais du coup apres elle ne m'attend plus sur les read qd l'utilisateur doit rentrer ses infos. j'ai trouvé la fonction :
ioctlsocket(serveur, FIONBIO, 0); avec le dernier 0 ou 1 pour activer/desactiver le bloquant/non bloquant
mais cette fonction ne marche que sous windows.

EQUIVALENT QNX DE LA FONCTION ioctlsocket ????????????

D'avance merci!

1 réponse

Char Snipeur Messages postés 9696 Date d'inscription vendredi 23 avril 2004 Statut Contributeur Dernière intervention 3 octobre 2023 1 297
11 déc. 2008 à 12:42
Je ne sais pas si les fonctions sont bien documenter pour cet OS...
regarde là :
http://www.linux-kheops.com/doc/man/manfr/man-html-0.9/man2/ioctl.2.html
http://www.linux-kheops.com/doc/man/manfr/man-html-0.9/man2/setsockopt.2.html
http://www.linux-kheops.com/doc/man/manfr/man-html-0.9/man2/accept.2.html
0