Non-blocking sockets

Post Reply
diablo2_v
Posts: 1
Joined: Thu Jun 19, 2008 7:08 am

Non-blocking sockets

Post by diablo2_v » Fri Jun 20, 2008 5:56 am

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!

lanjoe9
Posts: 8
Joined: Wed Jan 21, 2009 2:37 am

Re: Non-blocking sockets

Post by lanjoe9 » Sat Jan 24, 2009 4:21 pm

Have you tried:

Code: Select all

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests