mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
removed conversion to string
This commit is contained in:
parent
aaef06bbf8
commit
2f7c4731d1
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user