-
Simple Question recv
ok im new to sockets in c++ (i started learning a few hours ago) i used em before in a nice and simple ocx back when i coded in vb, but im having 1 major problem im calling recv() to get any data but if i call it and thr is no data it hangs, is thr a method of checking see if thr is a msg before i use recv() or is thr a flag like no_wait, any help would be great i think i may have to use select, or WSAAsyncSelect and if so could u post an example or if not post the better way lol cheers thanx
-
-
Check out MSDN.
http://msdn.microsoft.com/library/de.../ntwrkprot.asp
Check out my website for software development links.
http://www.dslextreme.com/users/kuphryn/links.html
I highly recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund.
Kuphryn
-
if you want to use select i think you better read Beej’s Guide to Network Programming . it will give you all the examples you need.
-
actualy salems post was all i needed but thanx for the followup, im using WSAAsyncSelect() sending my msg handle'r window handle, WM_NET (defined) and sending the flags for return on recv msg, then im checking in the window proc for the msg then im checking the socket using recv, but thanx neways