Пример #1
0
 def _raise_errors(self, possible_error):
     if possible_error is RAISE_EAGAIN:
         raise socket.error(errno.EAGAIN, "try again later")
     elif possible_error is RAISE_WANT_READ:
         raise ssl.SSLWantReadError("Want read")
     elif possible_error is RAISE_WANT_WRITE:
         raise ssl.SSLWantWriteError("Want write")
Пример #2
0
 def recv_data(self, control_frame=False):
     if self.returndata:
         return ABNF.OPCODE_TEXT, self.returndata.pop(0)
     else:
         raise ssl.SSLWantReadError()