mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-12 17:49:50 +00:00
Merge d99e72f4f7e41d058dad638f1b6053d0ee7fb835 into e59d819d091efdb30e385f4ecfe9ab5d36c3be71
This commit is contained in:
commit
c1e7c6a7e5
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user