SDL_net TCP connection error -> Solution found

    IPaddress addr = {INADDR_NONE, GAMPORT};
    shouldn't this be htons(GAMPORT)?  --^

I’m not sure but I tried and it changed nothing… Actualy, as the
client and the server are initialized with the same value, even if the
port is not the one I expected, it should work…
Where GAMPORT is defined and how?

they are not declared with the same value, since on the client you have to resolv
the hostname with the portnumber as parameter… so it will automaticaly htons()
the port number for you…

OK!!! that was it!!!
so, I sum up if one day someone looks for the same piece of info than me
in the archive:
server : addr.port = htons(myport); addr.host = INADDR_NONE;
client : TCP_Resolv(&addr, name, myport);

Too bad there is still no doc…
Yes… that’s why I didn’t work with it yet…
Yeah but you need no doc! =)
Thanks a lot!!!

Bye!
ChewI
-------------- next part --------------
A non-text attachment was scrubbed…
Name: chewi.vcf
Type: text/x-vcard
Size: 285 bytes
Desc: Card for Yann LEYDIER - ChewI LEE / BYG
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010929/9b35a058/attachment-0007.vcf

OK!!! that was it!!!
:slight_smile:

so, I sum up if one day someone looks for the same piece of info than me
in the archive:
server : addr.port = htons(myport); addr.host = INADDR_NONE;
client : TCP_Resolv(&addr, name, myport);

Too bad there is still no doc…
Yes… that’s why I didn’t work with it yet…
Yeah but you need no doc! =)
hehe ok… latter i’ll take a look, and maybe use it in my game…
if i don’t prefer glib… :slight_smile:

Thanks a lot!!!
welcome! :slight_smile:
—end quoted text—

[]'sOn Sun, Sep 30, 2001 at 12:55:41AM +0200, Yann LEYDIER - ChewI LEE / BYG wrote:

Marcelo R Leitner
ICQ #: 29966851
Kill’em All … And Justice For All.