Share via


Creating a Socket Client Application (Windows Embedded CE 6.0)

1/6/2010

This topic describes how to create a socket client application.

To create a socket client application

  1. Perform name resolution to obtain a list of addresses to communicate with.

  2. Open a socket with the socket (Windows Sockets) function using the properties returned in the addrinfo structure returned by the getaddrinfo function.

  3. Attempt to connect to the server with the connect (Windows Sockets) function using the addresses returned by getaddrinfo.

  4. Exchange data with a server, using the send/sendto and recv/recvfrom functions.

  5. For connection-oriented sockets, shut down the socket with the shutdown function.

  6. Close the socket with the closesocket function.

  7. For an example of a socket client application, see Windows Embedded CE topic Socket Client.

See Also

Concepts

Stream Socket Application
Creating a Socket Server Application
Socket Server