Skip to content

Commit

Permalink
echo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matanbroner committed May 12, 2023
1 parent 1dea841 commit 9cd2da2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions evaluation/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def read_client_header(self, sock):
def handle_client(self, conn: ClientConnection):
# If client is an echo client, just echo the data back as we receive it
if conn.type == 2:
# Be the first to send data
data = generate_random_data_buffer(conn.buffer_size)
conn.socket.sendall(data)
while True:
data = conn.socket.recv(conn.buffer_size)
if not data:
Expand Down

0 comments on commit 9cd2da2

Please sign in to comment.