Beispiel #1
0
 def serve_forever(self):
     # self.socket.settimeout(0.1)
     self.socket.listen(1)
     while True:
         try:
             connection, address = self.socket.accept()
             handler = HttpClientHandler(connection, self)
             handler.start()
         except socket.timeout:
             pass
Beispiel #2
0
 def serve_one(self):
     self.socket.listen(1)
     connection, address = self.socket.accept()
     handler = HttpClientHandler(connection, self)
     handler.start()