Skip to content

Commit

Permalink
Minor fixes based on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
semanurbilada committed Jul 29, 2024
1 parent 82a26f7 commit c8c1b34
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion client/tcp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
port = 12345
server_ip = 'server_ip'

message_count = 10000

s.connect((server_ip, port))
print(f"Connected to server at {server_ip}:{port}")

try:
for i in range(100):
for i in range(message_count):
timestamp = time.time()
message = f'{timestamp} Hello this is your client! Message {i+1}'
s.send(message.encode('utf-8'))
Expand Down
4 changes: 3 additions & 1 deletion client/udp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
port = 12345
server_ip = 'server_ip'

message_count = 1000

try:
for i in range(100):
for i in range(message_count):
timestamp = time.time()
message = f'{timestamp} Hello this is your client! Message {i+1}'

Expand Down
4 changes: 2 additions & 2 deletions server/tcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
except Exception as e:
print(f"Error connecting to client: {e}")
finally:
s.close()
print("Connection closed")
#s.close()
print("Done!")

0 comments on commit c8c1b34

Please sign in to comment.