title: simple server with multiple clients
body: <p>I'm trying to implement simple server with multiple clients. It should receive data from necessary socket, process and then send data to other clients. I use select module from Python standard library. 
  Here's server:</p>
  
  <pre><code>class ProcessingServer:
      def __init__(self, bindaddress="localhost", portname=50001, maxqueue=5):
          self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          self.socket.bind((bindaddress, portname))
          self.socket.listen(maxqueue)
          self.inputsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          self.data = ""
  
      def connect_to_output(self, address, port):
          self.inputsocket.connect((address, port))
  
      def start(self):
          rsocks = []
          wsocks = []
          rsocks.append(self.socket)
          wsocks.append(self.inputsocket)
          self.socket.accept()
  
          while True:
              try:
                  reads, writes, errs = select.select(rsocks, wsocks, [])
              except:
                  return
              for sock in reads:
                  if sock == self.socket:
                      client, address  = sock.accept()
                      rsocks.append(client)
                  else:
                      self.socket.send(self.data)
                      rsocks.remove(sock) 
              for sock in writes:
                 if sock == self.inputsocket:
                      self.data = sock.recv(512)
                      wsocks.remove(sock)
                      print repr(self.data)
  </code></pre>
  
  <p>Here's simple client:</p>
  
  <pre><code>import socket
  mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  mysocket.connect(("localhost", 50001))
  while True:
      data = mysocket.recv(512)
      print repr(data)
  mysocket.close()
  </code></pre>
  
  <p>Receiving part of server works fine, but server doesn't produce any output. 
  I'm not experienced in network programming at all and It feels like I'm missing something.</p>