The INET domain (cont.)
The client needs to know the machine name and port of the server
struct hostent *host;
host = gethostbyname( “eddie.cdf” );
Note: need to link with libnsl.a to resolve gethostbyname()
see course website for:
- server.c, client.c UNIX domain example
- server2.c, client2.c, INET domain example