Page 1 of 1

Non-blocking sockets

Posted: Fri Jun 20, 2008 5:56 am
by diablo2_v
Hello,

I am new to Wii homebrew, and don't have too much experience with networking, so bear with me.

I am currently working on a network project for the Wii, and would like to use non-blocking sockets. Unfortunatly, I have not been able to get them to work, the net_accept/net_recv functions still block until data is recieved. If I understand things correctly, by calling the following, these calls should not block.

Code: Select all

	u32 nonBlock = 1;
	int result = net_ioctl(mSocket, FIONBIO, &nonBlock);
The net_ioctl function returns 0, so it is not reporting an error.

Has anyone been able to get non-blocking sockets working?

Thanks a lot for the help!

Re: Non-blocking sockets

Posted: Sat Jan 24, 2009 4:21 pm
by lanjoe9
Have you tried:

Code: Select all

	fcntl(mSocket, F_SETFD, O_NONBLOCK);
I'm not entirely sure if it actually works though.