Skip to content
Snippets Groups Projects
Commit 0d7bdd18 authored by Alexander Schulz's avatar Alexander Schulz
Browse files

client interaction

parent 0f360c06
No related branches found
No related tags found
No related merge requests found
......@@ -66,13 +66,16 @@ class Client(multiprocessing.Process):
while True:
message = input()
if message.lower() == 'exit':
break
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect((self.registered_server_address, PORT))
client_socket.sendall(bytes(message, 'utf-8'))
client_socket.close()
client_socket.close()
# exit logic in server is still missing
if message.lower() == 'exit':
print("Client: Shutdown chat client")
break
def receive_messages(self):
PORT = 51000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment