I'm using the module socket for python, I did my server and my client but there is a problem: sometimes my client doesn't receive the message from the server, because I guess that the server sent the message before that the client is listening. I thought to do something like that:
HEADER = 64
FORMAT = 'utf-8'
while(response =! "received"):
client1.send("hello")
response = client1.recv(HEADER).decode(FORMAT)
This can't work because the function recv() wait until the package come. I want to use the multiprocessing module, but I don't like how, can somebody help me?