Socket API is divided into MFC Socket and Winsock API programming interfaces. The two approaches are equivalent and it is hard to say which is better. MFC Socket adopts object-oriented thought and encapsulates Winsock API into C++ class, which is convenient for programmers to call.
MFC sockets are classified into CAsyncSocket and CSocket. CSocket is derived from CAsyncSocket. CAsyncSocket is asynchronous non-blocking and CSocket is synchronous blocking. CAsyncSocket uses the Message mechanism of Windows to call back network events. It not only shields the complexity of the underlying Winsock API, but also loses flexibility and is easy to get started. \
\