add : split request

added the version of the code that sends the request in split and times it
This commit is contained in:
2025-09-25 15:35:33 +02:00
parent 14c5f6b1b1
commit 1960eb632b

View File

@ -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()