[SDL] SDLNet Receives...

Jayson S Baird jsb8545 at cis.ksu.edu
Thu Aug 2 17:12:01 PDT 2001


with SDLNet (if it's even supported through this list), I'm having
problems with SDLNet receive on the client side of a client / server

When trying to receive, using SDLNet_CheckSockets() to see if a socket is
ready, it segfaults. GDB reports: 

	[Switching to Thread 1024 (LWP 16709)]
	0x4009f084 in SDLNet_CheckSockets (set=0x804a4d8, timeout=600000)
    	at SDLnetselect.c:195
	195                   FD_SET(set->sockets[i]->channel, &mask);
	Current language:  auto; currently c

since the socket set isn't null, I can only assume that the problem is
with what the value of sockets[i] is. sockets[i], I can only assume is the
only TCP socket I allocate on the client side. It's built using:
	SDLNet_TCP_AddSocket(socketset, tcpsocket);
	SDLNet_ResolveHost(&server_addr, server, port);
	if(server_addr.host != INADDR_NONE) {
		tcpsocket = SDLNet_TCP_Open(&server_addr);

Anyone have any ideas why tcpsocket is becoming unuseable?

Thanks in advance for any help, and if this is the wrong place to ask this
question, where can it be poked and prodded at?



jbaird at ncsa.uiuc.edu

More information about the SDL mailing list