/* tcp client skeleton */ #include #include #include #include #include #include #include #include #include /* argv[0] is always the name of the program itself (implicit) argv[1] will be ip address of server argv[2] will be port number of server */ /* The read command of c takes an argument indicating the MAXIMUM number of bytes to read, and returns the actual number of bytes read, so to keep reading until we've read exactly a cetain number of bytes, we should use the following: */ void readfully(int cfd, void* addr, int size) { int r = 0; // number of bytes read so far while (r