I need to connect to a remote server whose remote name and PORT number is specified to me. This I need to do over Unix sockets. After connecting with it, I will need to receive the messages the server sends and then send it data as it instructs me to do. I know the steps to make this client program but i'm lost as to the exact things I need to do. Also I am confused about getaddrinfo() and gethostbyname(). Can someone tell me how a real life client would do this. This may be a simple task but i am stuck as to how to start the coding. The implementation is to be done in C using gcc in linux.
Note: its not the IP Address but the remote server name given.