#include "nethelp.h"

/* invoke client using "myclient tanner.csc.villanova.edu 3333" */

int main(int argc, char * argv[])
{
   int port, clientfd;
   char * hostname;

   if(argc < 3)
   {
      printf("Please supply the hostname and port number\n");
      exit(1);
   }
   hostname = argv[1];
   port = atoi(argv[2]);

   clientfd = open_clientfd(hostname, port);
   if(clientfd < 0) {
      printf("Connection to <%s, %d> failed\n", hostname, port);
      exit(0);
   }
   write(clientfd, "Hello Server\n", strlen("Hello Server\n"));
   close(clientfd);

   return 0;
}