title: client to server, socket in python many to one relationship
body: <p>Hi I was able to connect my client to my server, but it has only one to one relationship( 1 client to server). My question in what should I do so that I can connect many client to my server? does anyone has an idea about my situation? any help will be appreciated, thanks in advance... Below is my codes.</p>
  
  <p>server.py</p>
  
  <pre><code>import socket
  
  s = socket.socket()
  host = socket.gethostname()
  port = 12349
  s.bind((host, port))
  
  s.listen(5)
  while True:
      c, addr = s.accept()
      pressed = 0
      while True:
          print 'Got connection from', addr
          data = c.recv(1024)
          if not data:
              break
          pressed = pressed + 1
          print data, 'pressed count', pressed
  </code></pre>
  
  <p>client.py</p>
  
  <pre><code>import socket 
  from Tkinter import*
  
  root = Tk()
  
  root.title("ADKOO")
  root.geometry("150x80")
  
  s = socket.socket()         # Create a socket object
  host = socket.gethostname() # Get local machine name
  port = 12349
  s.connect((host, port))
  
  def counterPlus():
    print "sending to"
    s.send('sent by '+host)
  
  
  app = Frame(root)
  app.grid()
  
  button1 = Button(app, text="+", width=15, command=counterPlus)
  
  button1.grid()
  root.mainloop()
  </code></pre>