0

I'm new in python so please bear with me. I'm writing a GUI with server side and client side. clients are able to connect to the server. Then the server can choose clients that it wants to communicate with.

But now i'm facing a problem. I don't know how to send message to specific client. I did some research. It seem that i need a list to save the client's connection. But i still don't really understand it. So i'm looking for some simple example or clear concept. Thank you very much.

1 Answers1

1

I hope this could help you. This could assign a separate name for the client and then you can do the rest.

    mydict = {}
    mydict[clientname] = self._address
    #get user by name

    for client,addr in mydict.iteritems():
       if client == "xx":
           destinationaddr = addr
           break
user9371612
  • 95
  • 1
  • 12