I had a question. Can someone let me have an example program using WSAAsyncSelect(...) and things like:
case FD_READ:
// code
break;
I would like to use it for a program I am making.
I had a question. Can someone let me have an example program using WSAAsyncSelect(...) and things like:
case FD_READ:
// code
break;
I would like to use it for a program I am making.
Website(s): http://www16.brinkster.com/trifaze/
E-mail: [email protected]
---------------------------------
C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
DirectX Version: 9.0b
DX SDK: DirectX 8.1 SDK
try looking at this
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
Nice tutorial. He glosses over the FW_READ though. Little harder than that in most cases.
Need to know what type of data and how much you are expecting, before sending the data to be processed.
ie a chat program.
If only half the text is recieved in one read what do you do? How do you know you only have half?
You could send the size of the data first (as a long or int) and read this first, when the actual data starts arriving must wait for all to arrive and then can send it to the screen.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill