Hi,
I have created a very simple client-server model using sockets. Server is
created by sub classing threading.thread. The 'run' method is continuously
listening for client's response. When server send a string to client, client
response back by changing that string into uppercase.
I would like to synchronize send and receive. For example:
def sendmsg(self, msg):
self.client.send(msg)
#wait until next msg is received in 'run'
return self.response
I tried using a while loop for waiting but it's blocking the 'run' method.
Don't know much about threading event and lock and if they can help me here.
Any pointers?
Prashant
--
http://mail.python.org/mailman/listinfo/python-list