[SDL] A bug in SDL_Net?

Sam Lantinga slouken at devolution.com
Sun Jan 14 22:14:10 PST 2001

> The 'port' field in IPaddress struct passed
> as an argument to SDLNet_TCP_Open( ) is
> apparently expected to be in the "MSB first"
> format (at least it is on my Win95 box).
> I had to swap the bytes of the port value to
> accept connections on the correct port.

That's correct.  The address passed in to the open call should already
be swapped to network byte order (addresses returned from SDLNet_ResolveHost()
are already in the correct form).  This has been added to the header
documentation in CVS.

	-Sam Lantinga, Lead Programmer, Loki Entertainment Software

More information about the SDL mailing list