The CCeSocket class is derived from the CSocket class. If you want to use asynchronous communication in Windows CE, you must use the CCeSocket class. Windows CE does not inherently support asynchronous socket communication, but the CCeSocket class provides asynchronous notification for the following three types of socket events:
Header file: | Wcesock.h |
Platforms: | |
Versions: | 2.0 and later |
Use the CCeSocket class, or a class derived from CCeSocket, for Windows CE applications, rather than using CSocket or CAsyncSocket.
The CSocket and CAsyncSocket classes rely on the standard Windows message-based notification of network events, but Windows CE doesn't support asynchronous event notification. Without access to asynchronous event notification, an application would have to poll for network events that it wished to handle. This would be very inefficient. The CCeSocket class achieves the effect of asynchronous event notification by creating two threads that monitor socket events. When a thread detects one of the three events for which the CCeSocket class provides notifications, it sends a message to the appropriate handler. All instances of CCeSocket share the same two monitor threads.
The CHATTER/CHATSRVR sample programs demonstrate how to use the CCeSocket class. You can find them in the Wce\Samples\Mfc directory.
CCeSocket Member Functions, Windows Sockets Classes, CArchive, CAsyncSocket, CSocketFile