环境搭建
Vmware虚拟机
Ubuntu20.04
执行官方提供的shell脚本下载环境依赖
vscode remote
先看主函数
#include "socket.hh"
#include "util.hh"
#include <cstdlib>
#include <iostream>
using namespace std;
void get_URL(const string &host, const string &path) {
// Your code here.
// You will need to connect to the "http" service on
// the computer whose name is in the "host" string,
// then request the URL path given in the "path" string.
// Then you'll need to print out everything the server sends back,
// (not just one call to read() -- everything) until you reach
// the "eof" (end of file).
cerr << "Function called: get_URL(" << host << ", " << path << ").\n";
cerr << "Warning: get_URL() has not been implemented yet.\n";
}
int main(int argc, char *arg