[gameprogrammer] Re: recvfrom returning 0 on UDP and blocking
- From: "Neil Griffiths" <neil@xxxxxxxxxxxx>
- To: <gameprogrammer@xxxxxxxxxxxxx>
- Date: Wed, 23 Jun 2004 20:07:38 +0100
IIRC, it's because it's possible that the previous recvfrom() didn't
flush the buffers properly and so the next time you call it to block, it
will return 0 (as in no data - not a disconnect which is impossible with
UDP as you know).
Why are you blocking anyway, is there any reason you're not using a
FD_SET ?
Neil
-----Original Message-----
From: gameprogrammer-bounce@xxxxxxxxxxxxx
[mailto:gameprogrammer-bounce@xxxxxxxxxxxxx] On Behalf Of Kevin Jenkins
Sent: 23 June 2004 07:16
To: gameprogrammer@xxxxxxxxxxxxx
Subject: [gameprogrammer] recvfrom returning 0 on UDP and blocking
Why would recvfrom, on UDP and blocking, ever return 0?
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: recvfrom returning 0 on UDP and blocking
- From: Kevin Jenkins
Other related posts:
- » [gameprogrammer] recvfrom returning 0 on UDP and blocking
- » [gameprogrammer] Re: recvfrom returning 0 on UDP and blocking
- » [gameprogrammer] Re: recvfrom returning 0 on UDP and blocking
- » [gameprogrammer] Re: recvfrom returning 0 on UDP and blocking
- » [gameprogrammer] Re: recvfrom returning 0 on UDP and blocking
- [gameprogrammer] Re: recvfrom returning 0 on UDP and blocking
- From: Kevin Jenkins