C++ Socket flags

I'm working on a program that uses a CSocket, and the original coder decided to use a while loop with the CSocket.Receive call.

Below are the options I have for arguments.

CSocket.Receive(void *lpBuf, int nBufLen, int nFlags = 0)

I have searched google for nearly an hour and cannot find anything that explains what options i have with the int nFlags = 0 argument.

Is there a list of possibilities I can find anywhere? I have found some .net enums, but I'm not using .net.

My end requirement is to add a timeout period to the receive, or continue on through the code while waiting to receive the data.

Thanks!
Last edited on
So, where on that page does it show an int to string conversion on the options?

If I want MSG_PEEK then I need what number as the flag? to represent int nFlags.
They are not strings.
1
2
3
4
CSocket.Receive(/*...*/,/*...*/,0);
CSocket.Receive(/*...*/,/*...*/,MSG_PEEK);
CSocket.Receive(/*...*/,/*...*/,MSG_OOB);
CSocket.Receive(/*...*/,/*...*/,MSG_PEEK|MSG_OOB);

Time to learn how to read documentation.
I may need to learn how to read, which is fine by me. I don't understand how Receive(blah,blah,int) can take in Receive(blah,blah,blah) Sorry. int means integer to me.

Edit:
I did not realize until a few minutes ago that MSG_PEEK is a global integer variable or enum or what ever it happens to be that relates to an int.
Last edited on
Topic archived. No new replies allowed.