How do I know when there's data available in a socket's buffer?

I'm using a CSocket object and haven't created my own derived class. And I need to know at any given time how I can tell if there's data to read in the socket's buffer. Actually I want to poll the socket for incoming data...how do I go about this?

Thanks.