This post has to do with SDLNet and not SDL directly, but I hope
some of you can be of some help.
When calling SDLNet_GetPeerAddress() on a socket I KNOW is
most definately NOT NULL, and perfectly valid (I’ve been sending
data to it and receiving it on the other end) I’m getting an IPaddress
that has a port that prints as a blank to my console and a port that is
different every time, and random, as if the IPaddress returned was not
in any initialized memory and I’m accessing some random bytes
somewhere in my RAM. Either that or SDLNet_GetPeerAddress is just
creating me an IPaddress that is just plain WRONG!
Has anyone else had similar behavior, does anyone know what might
be wrong or how to fix it?