From: Slackin on
I need a good book to learn CAsyncSocket and Csocket. I want to
explain in greater detail the functions and the author is an expert in
the field.

What do you recommend?

thanks
From: Joseph M. Newcomer on
You don't need a "good book" to learn CSocket; there is only one thing you need to know
aobut CSocket: DO NOT USE IT!

For CAsyncScoket, I learned it from the MFC source samples. You might want to check out
my essay on multithreaded CAsyncSocket on my MVP Tips site; just skip over where I point
out that the KB example is complete rubbish. You don't NEED to use multiple threads; the
CAsyncSocket handling is the same in the main thread as in secondary threads, and is
essentially based on the (correct) single-threaded example of MFC socket programming.

There is no book because it would be very, very short.
joe

On Tue, 13 Apr 2010 15:00:09 -0700 (PDT), Slackin <pedroosorio777(a)gmail.com> wrote:

>I need a good book to learn CAsyncSocket and Csocket. I want to
>explain in greater detail the functions and the author is an expert in
>the field.
>
>What do you recommend?
>
>thanks
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Robert Thomason on
On 4/14/2010 11:16 AM, Joseph M. Newcomer wrote:
> You don't need a "good book" to learn CSocket; there is only one thing you need to know
> aobut CSocket: DO NOT USE IT!
>
> For CAsyncScoket, I learned it from the MFC source samples. You might want to check out
> my essay on multithreaded CAsyncSocket on my MVP Tips site; just skip over where I point
> out that the KB example is complete rubbish. You don't NEED to use multiple threads; the
> CAsyncSocket handling is the same in the main thread as in secondary threads, and is
> essentially based on the (correct) single-threaded example of MFC socket programming.
>
> There is no book because it would be very, very short.
> joe

I second Joe's recommendation of his article; I learned enough from it
to develop an application that handles a lot of TCP/IP communications.
The overall process is pretty straightforward, once you've seen an
example of it done correctly.