removed conversion to string

This commit is contained in:
algobytewise 2021-03-23 14:19:29 +05:30
parent aaef06bbf8
commit 2f7c4731d1
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ if __name__ == "__main__":
print("Receiving data...")
while True:
data = sock.recv(1024)
print(f"data={str(data)}")
print(f"data={data}")
if not data:
break
out_file.write(data) # Write data to a file

View File

@ -13,7 +13,7 @@ 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)
print(f"Server received {str(data)}")
print(f"Server received {data}")
with open(filename, "rb") as in_file:
data = in_file.read(1024)