lab5 done right
This commit is contained in:
parent
fe97e171b4
commit
384cc9500f
@ -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);
|
||||
|
||||
@ -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).
|
||||
|
||||
Loading…
Reference in New Issue
Block a user