tcpcli02.c 231 B

1234567891011121314151617
  1. #include "unp.h"
  2. int
  3. main(int argc, char **argv)
  4. {
  5. int sockfd;
  6. if (argc != 3)
  7. err_quit("usage: tcpcli <hostname> <service>");
  8. sockfd = Tcp_connect(argv[1], argv[2]);
  9. str_cli(stdin, sockfd); /* do it all */
  10. exit(0);
  11. }