add : split request
added the version of the code that sends the request in split and times it
This commit is contained in:
@ -7,7 +7,8 @@ client_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
|
||||
sock.connect(('{tcp_server_adress}', 80))
|
||||
|
||||
request = f"GET / HTTP/1.1\r\nHost: {tcp_server_adress}\r\n\r\n"
|
||||
request = f"GET / HTTP/1.1\r\n"
|
||||
request = f"Host: {tcp_server_adress}\r\n\r\n"
|
||||
sock.sendall(request.encode())
|
||||
|
||||
buffer = b""
|
||||
@ -19,4 +20,4 @@ while True:
|
||||
|
||||
print(buffer.decode())
|
||||
|
||||
sock.close()
|
||||
sock.close()
|
||||
Reference in New Issue
Block a user