Forum de la communauté SFML

Bindings - autres langages => C => Discussion démarrée par: Léandre le Avril 06, 2017, 01:42:38 pm

Titre: Probleme socket UDP (bind)
Posté par: Léandre le Avril 06, 2017, 01:42:38 pm
Bonjour,
Je souhaite créer un système d'échange de sockets UDP pour un jeu en CSFML.
J'ai créer une structure pour chaque joueur, et qui contient un sfUdpSocket * que j'initialise au tout début avec sfUdpSocket_create(),
ensuite je souhaite bind la socket, et la, c'est le hic:

player->socket = sfUdpSocket_create();
sfUdpSocket_setBlocking(player->socket, sfFalse);
if (!(sfUdpSocket_bind(player->socket, PORT)))
    my_printf("Error while binding Socket\n");

 ou port est une macro = 32000
Enfin bref je reçois l'erreur permanente
Error while binding Socket
Failed to bind socket to port 32000

Merci d'avance.
Titre: Re: Probleme socket UDP (bind)
Posté par: Léandre le Avril 06, 2017, 01:46:13 pm
Ok non je suis un débile, j'ai essayé d'ouvrir plusieurs socket sur le meme port