To build web-server, please tap:
g++ -pthread web-server.cpp -o web-server
Here is the usage of web-server:
./web-server [hostname] [port] [server_directory]
For example, you can refer to your own computer as a server using localhost
as the hostname, listening on port 8080
and serving files on /tmp
directory:
./web-server localhost 8080 /tmp
To build web-client, please tap:
g++ -o web-client web-client.cpp
Here is the usage of web-client:
./web-client http://[hostname]:[port]/[file_name]
For example, you can have an HTTP GET by:
./web-client gaia.cs.umass.edu:80/wireshark-labs/HTTP-wireshark-file1.html