CAsyncSocket question: Why do all the functions return 0?
I've been trying to reproduce many, many turtorials that use
These turorials use very different ways to create their connection
routines, most are created with a pointer and new . One thing for
sure, none of them use a simple routine like this:
// Sample naive code
/* Or this --->
sock.Create(80, SOCK_STREAM, FD_READ | FD_WRITE | FD_CONNECT |
I don't know which to use but either way the both fail and the
following connect seems redundant if I use the second */
I guess its because they all want to create an instance to CAsyncSocket
to define their own OnReceive routine or some other nifty function not
quite relevant to the tutorial at hand. If only I could at least connect
somewhere, I'd deal with the receive bit in a nifty way also.
So why is this code above not working (Create and Connect always return
0) ? What am I missing ? I traced this up the connect() BSD style API
and it always fails there. My connection to my network is good,
because the tutorials work great. I'm just missing something I can't
put my finger on it.
Any help appreciated.