コード例 #1
0
 def sendall(self, data, flags=0):
     try:
         socket.sendall(self, data)
     except _socket_timeout as ex:
         if self.timeout == 0.0:
             # Python 2 simply *hangs* in this case, which is bad, but
             # Python 3 raises SSLWantWriteError. We do the same.
             raise SSLError(SSL_ERROR_WANT_WRITE)
         # Convert the socket.timeout back to the sslerror
         raise SSLError(*ex.args)
コード例 #2
0
ファイル: _ssl2.py プロジェクト: wellbehavedsoftware/gevent
 def sendall(self, data, flags=0):
     try:
         socket.sendall(self, data)
     except _socket_timeout as ex:
         if self.timeout == 0.0:
             # Python 2 simply *hangs* in this case, which is bad, but
             # Python 3 raises SSLWantWriteError. We do the same.
             raise SSLError(SSL_ERROR_WANT_WRITE)
         # Convert the socket.timeout back to the sslerror
         raise SSLError(*ex.args)
コード例 #3
0
    def sendall(self, data, flags=0):
        self._checkClosed()
        self.__check_flags('sendall', flags)

        try:
            socket.sendall(self, data)
        except _socket_timeout as ex:
            if self.timeout == 0.0:
                # Python 2 simply *hangs* in this case, which is bad, but
                # Python 3 raises SSLWantWriteError. We do the same.
                raise SSLWantWriteError("The operation did not complete (write)")
            # Convert the socket.timeout back to the sslerror
            raise SSLError(*ex.args)
コード例 #4
0
ファイル: _sslgte279.py プロジェクト: ii200400/SpineAnalyzer
    def sendall(self, data, flags=0):
        self._checkClosed()
        self.__check_flags('sendall', flags)

        try:
            socket.sendall(self, data)
        except _socket_timeout as ex:
            if self.timeout == 0.0:
                # Python 2 simply *hangs* in this case, which is bad, but
                # Python 3 raises SSLWantWriteError. We do the same.
                raise SSLWantWriteError("The operation did not complete (write)")
            # Convert the socket.timeout back to the sslerror
            raise SSLError(*ex.args)