You know I searched your email up and down Arjen. I thought to myself,
“Surely, this Arjen hasn’t omitted his operating system, the version of
SDL_net he’s using, and other vital information.” But alas, you have
omitted this information.
Now I’m unfamiliar with SDL_net myself, but I’m willing to bet it comes
with some test applications. Why don’t you use those and see if you can
replicate this erroneous behavior?
even though you’ve demonstrated considerable ineptitude by your glaring
omissions of important information, that the problem you’re
experiencing isn’t your fault.
I know enough to give you a probable solution, but I am reluctant to
post it since I do not know the internals of SDL_net. Could an SDL_net
expert perhaps come along and provide this guy with some help?.. that
is, after he posts his specific circumstances (SDL_net version, OS,
etc)
Good luck with your problem Arjentina, don’t let that nation debt get
you down!From my experience with unix networking, I’d be willing to bet that
On Sep 21, 2004, at 4:25 PM, Arjen wrote:
Hi,
I have a problem using SDL_Net.
I have a working client and server application, but the problem is
this when one
of the two programs chrashes, the other chrashes also. It does mention
an Broken
pipe when it chrashes, but i can’t find a way to prevent that from
happening.
The code is like this:
// value is an int* and sckt is an TCPSocket*
int result(0);
result=SDLNet_TCP_Send(sckt,value,4);
std::cout<<“output1:”<<result;
if(result>0){
result=SDLNet_TCP_Send(sckt,value2,4);
std::cout<<“output2:”<<result;
}
When i look at the output of the programm it says:
output1:4
followed by the Broken Pipe.(it seems like the second ‘Send’ always
causes the
Broken Pipe)
Though i thought it would be like
output1:0
If that where the case i could skip sending the second time, avoiding
the Broken
pipe. Now i wonder is there a way to avoid the broken pipe, or to
check wether a
socket is closed/unavaible or not.
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl