CAsyncSocket

A CAsyncSocket object represents a Windows socket, which is an endpoint of network communication. The CAsyncSocket class encapsulates the Windows Sockets API, providing an object-oriented abstraction for programmers who want to use Windows Sockets in conjunction with MFC.

Because Windows CE does not support asynchronous event notification, use the CCeSocket class instead of CAsyncSocket when writing an application for Windows CE. The CCeSocket class enables Windows CE applications to send and receive socket notifications for certain asynchronous events.

At a Glance

Header file: Afxsock.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 2.0 and later
Complete documentation: Visual C++ documentation

Remarks

MFC for Windows CE does not fully support asynchronous event notification, so it does not support the AsyncSelect method of the CAsyncSocket class. The new CCeSocket class does support asynchronous notification for certain socket events.

MFC for Windows CE does not support the GetLastError method of the CAsyncSocket class. Use the global GetLastError function instead.

See Also

CAsyncSocket::Attach, CCeSocket, CSocket, GetLastError, Windows Sockets Classes