Windows CE supports the standard Winsock 1.1 functions, except the asynchronous functions. Some asynchronous notification support is available through the Microsoft Foundation Classes (MFC) CCeSocket class. For more information on the MFC for Windows CE, see the Windows CE Toolkit for Visual C++® 6.0.
Winsock functions are defined in the Winsock.h header file. The following table shows Winsock functions implemented for Windows CE.
Function |
Description |
accept | Accepts a socket connection |
bind | Associates a local address with a socket |
closesocket | Closes a socket |
connect | Establishes a connection to a peer |
gethostbyaddr | Retrieves host data that corresponds to a network address |
gethostbyname | Retrieves host data that corresponds to a host name |
gethostname | Returns the standard host name for the local computer |
getpeername | Retrieves the address of the peer, to which a socket is connected |
getsockname | Retrieves the local address for a socket |
getsockopt | Retrieves a socket option |
htonl | Converts a u_long from host byte order to network byte order |
htons | Converts a u_short from host byte order to network byte order |
inet_addr | Converts a string containing a dotted address into a network address in the format of an IN_ADDR structure |
inet_ntoa | Converts a network address into a string in dotted format |
ioctlsocket | Controls the socket mode |
listen | Establishes a socket to listen for incoming connections |
ntohl | Converts a u_long from network byte order to host byte order |
ntohs | Converts a u_short from network byte order to host byte order |
recv | Receives data from a socket |
recvfrom | Receives a datagram and stores the source address |
select | Determines the status of one or more sockets |
send | Sends data on a connected socket |
sendto | Sends data to a specific destination |
setsockopt | Sets a socket option |
shutdown | Disables send or receive operations on a socket |
socket | Creates a socket |
WSACleanup | Initiates no action and is provided only for compatibility |
WSAGetLastError | Retrieves the error status for the last Winsock operation that failed |
WSAIoctl | Controls the mode of a socket |
WSASetLastError | Sets the error value retrieved by WSAGetLastError |
WSAStartup | Initializes a WSADATA structure |