Overview
There are five steps
- Figure out the IP address and port to connect to
- Create a socket
- Connect the socket to the remote server
read() and write() data using the socket
- Close the socket

You might want to lookup address structures in Network and Socket
ex15 answer.zip
Steps in Detail
Figure out the IP address and port to connect to
Reference: Resolving DNS Names
Create a Socket