-2

I have a client-server application consisted of three rounds. At each round the client sends a file to the server, the server computes sth and send it back to the client. The client based on the received message prepares the message for the next round etc.

The application sometimes works smoothly, sometimes not. I guess the problem is some sort of lack of synchronization between the rounds. For example before the client sends the message for the second round the server already starts its second round, which creates problems.

I do not use any module for networking apart from sockets and ThreadedTCPHandler. How i can assert my application to wait for example the other network entity to send its message before starting its execution, without creating deadlocks

curious
  • 1,524
  • 6
  • 21
  • 45

1 Answers1

0

Have a look at ZeroMQ and its Python client pyzmq. It provides a bit easier way to write client/server or distributed applications.

Messa
  • 24,321
  • 6
  • 68
  • 92