Client: The client program is invoked in one of the following two ways:
./client time <server_ip_address> <server_port_number>or
./client date <server_ip_address> <server_port_number>server_ip_address specifies the destination server's IP address, and server_port_number specifies the destination TCP port. For example:
$ ./client time 127.0.0.1 9876 07:30:25 $ sleep 3 $ ./client time 127.0.0.1 9876 07:30:28 $ ./client date 127.0.0.1 9876 2015-01-05requests the time/date from the local machine (using the localhost address of 127.0.0.1), on port 9876. The program should print out the answer.
Server: The server program is invoked in the following way:
./server portport specifies the port that the server will use to accept connections. For example:
The ISO 8601 extended time format is: [hh]:[mm]:[ss], where hh is the zero-padded hour between 00 and 23, mm is the zero-padded minute between 00 and 59, and ss is the zero-padded second between 00 and 59.
The ISO 8601 date format is: [YYYY]-[MM]-[DD], where YYYY is the four-digit year, MM is the zero-padded two digit month between 01 and 12, and DD is zero-padded day between 01 and 31 (depending on the month).
Include a Makefile that can be used to build your code by simply typing 'make'. The result should be two applications: one called 'client' and one called 'server', invoked via the above command line arguments. We should be able to check out your repository, then execute your code with these commands:
$ cd <github_id>_cse124 <github_id>_cse124 $ cd homework/hw2 hw2 $ make hw2 $ ./server 9876 hw2 $ ./client time 127.0.0.1 9876 hw2 $ ./client date 127.0.0.1 9876At the very least, your repository should contain the following files. You will of course have other files there too (e.g., your .c and .h files).
gmporter_cse124/ |-- homework |-- hw2 |-- client |-- Makefile |-- server 2 directories, 3 filesThe due date/time are specified on the course syllabus.