Beispiel #1
0
 def handle_request(self):
     L = coselect.poll_list([(self, coselect.POLLIN)], self.timeout
                            or self.socket.gettimeout())
     if not L:
         self.handle_timeout()
     else:
         self._handle_request_noblock()
Beispiel #2
0
 def handle_request(self):
     L = coselect.poll_list(
         [(self, coselect.POLLIN)],
         self.timeout or self.socket.gettimeout())
     if not L:
         self.handle_timeout()
     else:
         self._handle_request_noblock()
Beispiel #3
0
 def serve_forever(self, poll_interval=0.5):
     while True:
         A, B = self.fileno(), self.__shut[1].fileno()
         for S, E in coselect.poll_list([(A, coselect.POLLIN),
                                         (B, coselect.POLLIN)]):
             if S == B:
                 self.__shut[1].recv(100)
                 return
             elif S == A:
                 self._handle_request_noblock()
Beispiel #4
0
 def serve_forever(self, poll_interval=0.5):
     while True:
         A, B = self.fileno(), self.__shut[1].fileno()
         for S, E in coselect.poll_list(
                 [(A, coselect.POLLIN), (B, coselect.POLLIN)]):
             if S == B:
                 self.__shut[1].recv(100)
                 return
             elif S == A:
                 self._handle_request_noblock()