Creating a Socket Client Application
A version of this page is also available for
4/8/2010
This topic describes how to create a socket client application.
To create a socket client application
Perform name resolution to obtain a list of addresses to communicate with.
Open a socket with the socket (Windows Sockets) function using the properties returned in the addrinfo structure returned by the getaddrinfo function.
Attempt to connect to the server with the connect (Windows Sockets) function using the addresses returned by getaddrinfo.
Exchange data with a server, using the send/sendto and recv/recvfrom functions.
For connection-oriented sockets, shut down the socket with the shutdown function.
Close the socket with the closesocket function.
**
See Also
Concepts
Creating a Socket Server Application
Stream Socket Application