Winsock questions

KansaiRobot

Junior Member
May 1, 2012
21
0
61
Hello
I am now preparing to write a program using Winsock and I have several questions. Would appreciate some guidance.

First. I know there are synchronous(blocking) and asynchronous sockets.
I can see the usefulness of asynchronous sockets in a server program that waits for incoming connections. If not used, the blocking socket will ,...well "block" the program until a connection comes.

But what about a client program. Why would it need an asynchronous socket??

At first I though... well if it uses a GUI, it will be good to use that so as to not to block the GUI parts such as buttons and stuff, but then thinking about it... will a blocking socket "block" anything? because a client program sill connect , send and receive things and not wait right???

unless, this connecting sending and receiving takes time... does it??

my second question is ... if I want to use CAsyncSocket , does this work only with MFC C++ programs??
I mean , can't I -say- build as C++ CLI program and use that?? so far I have gotten some sample programs that use MFC -but I dont like MFC frankly- so I am wondering if that is a requirement.

Thanks for any help