http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

TheGrumpyProgrammer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gameprogrammer] Re: recvfrom returning 0 on UDP and blocking



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@freelists.org
[mailto:gameprogrammer-bounce@freelists.org] On Behalf Of Kevin Jenkins
Sent: 23 June 2004 07:16
To: gameprogrammer@freelists.org
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