Socket

casper_2 Messages postés 93 Date d'inscription vendredi 27 février 2004 Statut Membre Dernière intervention 30 mai 2005 - 31 janv. 2005 à 14:07
NitRic Messages postés 402 Date d'inscription mardi 1 mai 2001 Statut Membre Dernière intervention 15 août 2011 - 1 févr. 2005 à 04:32
Rebonjour,
jaimerais savoit,koment pourrai-je me reconecter automatiquement au serveur.
ex:
je lance mon programme sans ouvrir ma connexion internet.
10 seconde plus tard,je lance ma connexion internet et la j'ai aucun socket conecter!!
Comment pourrai-je ameloirer mon programme,afin kil puisse se conecter au serveur,kan j'ouvre ma connexion.

voici un bourt de ma synatxe!

do
{ A=connect(sd1,(SOCKADDR*)&sinDistant,sizeof(SOCKADDR_IN));
B=connect(sd5,(SOCKADDR*)&sinDistant,sizeof(SOCKADDR_IN));
C=connect(sd4,(SOCKADDR*)&sinDistant,sizeof(SOCKADDR_IN));
D=connect(sd3,(SOCKADDR*)&sinDistant,sizeof(SOCKADDR_IN));
E=connect(sd2,(SOCKADDR*)&sinDistant,sizeof(SOCKADDR_IN));
nb_connect++;

}while(A==SOCKET_ERROR || B==SOCKET_ERROR || C==SOCKET_ERROR || D==SOCKET_ERROR || E==SOCKET_ERROR);

CASPER

1 réponse

NitRic Messages postés 402 Date d'inscription mardi 1 mai 2001 Statut Membre Dernière intervention 15 août 2011
1 févr. 2005 à 04:32
Tu devrais plutôt tenter de vérifier si tu es `branché` au net et ensuite connecter tes sockets si c'est le cas.

~(.:: NitRic ::.)~
0
Rejoignez-nous