lab5 done right

This commit is contained in:
ridethepig 2023-02-18 08:54:40 +00:00
parent fe97e171b4
commit 384cc9500f
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ void get_URL(const string &host, const string &path) {
// 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).
CS144TCPSocket sock;
FullStackSocket sock;
sock.connect(Address(host, "http"));
string request = "GET " + path + " HTTP/1.1\r\nHost: " + host + "\r\nConnection: close\r\n\r\n";
sock.write(request);

View File

@ -5,11 +5,11 @@
#include "tcp_over_ip.hh"
#include "tun.hh"
#include <list>
#include <map>
#include <optional>
#include <queue>
#include <map>
#include <utility>
#include <list>
//! \brief A "network interface" that connects IP (the internet layer, or network layer)
//! with Ethernet (the network access layer, or link layer).