How may I check if data has arrived at a port using UDP?

How may I check if data has arrived at a port using UDP?
Thanx in advance!
[83 byte] By [answer] at [2007-11-18 23:16:37]
# 1 Re: How may I check if data has arrived at a port using UDP?
Well, you use recvfrom().

Was that your doubt?
Mathew Joy at 2007-11-9 13:47:34 >
# 2 Re: How may I check if data has arrived at a port using UDP?
recvfrom may block the thread if no data is in the socket.
To check whether data IS you may use different technique: select, WSAAsyncSelect, or WSAEventSelect etc.
sbubis at 2007-11-9 13:48:34 >
# 3 Re: How may I check if data has arrived at a port using UDP?
recvfrom may block the thread if no data is in the socket.Yea..it may block. But only as long as you are using blocking sockets.
:cool:
Mathew Joy at 2007-11-9 13:49:34 >
# 4 Re: How may I check if data has arrived at a port using UDP?
Sorry Mathew for my tediousness!

The reason for my previous post was that ANSWER asked:
How may I check if data has arrived at a port using UDP?

but your reply was about "how to receive data"
sbubis at 2007-11-9 13:50:39 >