From d67f09fb2f5a1dd11ac445eccec5dfe3976a6ce9 Mon Sep 17 00:00:00 2001 From: TinWoodman92 Date: Wed, 31 May 2023 21:17:06 -0500 Subject: clients now connect via sockets. --- source_file.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'source_file.py') diff --git a/source_file.py b/source_file.py index 9d10aed..672139c 100644 --- a/source_file.py +++ b/source_file.py @@ -28,17 +28,14 @@ def recv_msg(conn): msg = msg.decode(FORMAT) return msg -def terminate_connection(conn): - conn.close() - - msg = "Initializing Client - Python" display_msg(msg) msg = "Initialized Client - Python" send_msg(CONN, msg) -msg = recv_msg(CONN) -display_msg(msg) +while msg != '!DISCONNECT': + msg = recv_msg(CONN) + display_msg(msg) -terminate_connection(CONN) \ No newline at end of file +CONN.close() \ No newline at end of file -- cgit v1.2.3