Merge d99e72f4f7e41d058dad638f1b6053d0ee7fb835 into 338cbafe0d5b07d57f83060ea0f9ba3a6c1155e7

This commit is contained in:
lighting9999 2025-02-09 20:51:56 +03:00 committed by GitHub
commit ee25134927
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,8 @@ def send_file(filename: str = "mytext.txt", testing: bool = False) -> None:
conn, addr = sock.accept() # Establish connection with client.
print(f"Got connection from {addr}")
data = conn.recv(1024)
if not data:
break # IF NOT data received,the Client has closed the Connection.
print(f"Server received: {data = }")
with open(filename, "rb") as in_file: