Example #1
0
 def run(self):
     """Wait & serve. Calls request handler for every request (blocking)."""
     self.sock.listen(50)
     properties = wikiutil.prepareAllProperties()
     while 1:
         (conn, addr) = self.sock.accept()
         self.accept_handler(conn, addr, properties)
Example #2
0
 def run(self):
     """Wait & serve. Calls request_handler in new
     thread on every request."""
     import threading
     self.sock.listen(50)
     properties = wikiutil.prepareAllProperties()
     while 1:
         (conn, addr) = self.sock.accept()
         threading.Thread(target=self.accept_handler, args=(conn, addr, properties)).start()