Page 1 of 1

possible net_accept bug

Posted: Sat Mar 14, 2009 6:58 pm
by GEMISIS
Hi everyone, I'm fairly new to libogc, and am currently working with the network functions. I was wondering if anyone knows if net_accept is supposed to return -1 or not. On mine for some weird reason, it returns -11. I'm pretty sure it shouldn't but I don't know. Thanks :P

-GEMISIS

Edit: Probably should mention that I am using the newest version of both devkitppc and libogc.

Re: possible net_accept bug

Posted: Wed May 27, 2009 12:04 am
by Izhido
Hi!

Most functions in the network library (if not all) actually, in case of error, do not return -1, but -(whatever errno is set to). That is, -EINVAL, -EWOULDBLOCK, -ETIMEOUT, and so on. That explains the value you're getting from your call.

I'm almost sure that's not the expected behaviour of the Berkeley Sockets API... but remember, this is *not* that API.

Hoping this helps,

- Izhido