SDL_Net + loopback oddities (no error text set for error)

ok, im getting a strange error in my program.

like i said in an earlier post i have a client/server setup and im testing
over loop back.

the client is connecting to the server and communication is going both ways,
and then sometimes, all of a sudden, its like communication stops working.
I tried putting in printfs to see what the deal was but that makes it work
sometimes and other times it doesnt help so its really hard to get a grip on
whats going on, since an attempt at debugging alters the bug :stuck_out_tongue:

server is checking for new connections every 1000 ms, and client/server are
checking for new data every 100ms using the difference between ticks to tell
if it should check again (ie…no sleep).

i found out a place where its failing by pure dumb luck w/ some printf
debugging. On the server, it fails at SDLNet_TCP_Recv with the error
"accept() failed".

I looked at the source for SDLNet_TCP_Recv and there are 2 places where it
can error, 1 sets an error message and the other does not. Since im getting
an “accept() failed” message (which comes from trying to accept from a
listening socket that has no connections waiting), im pretty sure its
failing in the second case which has a printf #ifdef’d out of the code that
says “Open Transport error: %d\n”. What is an open transport error and what
could cause it?

It would be nice if the code returned an error so i could know what was
going on better, but does anyone have idea idea what could be causing this
or what to do about it?

Thanks,
Atrix

“OpenTransport” is the MacOSClassic layer for network.
Linux, solaris and macOSX don’t use OpenTransport.
MacOSClassic uses it.
Look in SDLnetsys.h to understand more precisely what’s happening.
Then, on which OS are you running on ?

But I don’t know a lot about TCP, can’t say more, sorry.

Atrix Wolfe wrote:> What is an open transport error and what

could cause it?

oh, forgot to say, im in windows.> ----- Original Message -----

From: nuage@ysagoon.com (Nuage)
To:
Sent: Tuesday, March 25, 2003 12:24 PM
Subject: Re: [SDL] SDL_Net + loopback oddities (no error text set for error)

“OpenTransport” is the MacOSClassic layer for network.
Linux, solaris and macOSX don’t use OpenTransport.
MacOSClassic uses it.
Look in SDLnetsys.h to understand more precisely what’s happening.
Then, on which OS are you running on ?

But I don’t know a lot about TCP, can’t say more, sorry.

Atrix Wolfe wrote:

What is an open transport error and what
could cause it?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl