(self, alertDescription, errorStr=None)
| 889 | |
| 890 | |
| 891 | def _sendError(self, alertDescription, errorStr=None): |
| 892 | # make sure that the message goes out |
| 893 | self.sock.flush() |
| 894 | self.sock.buffer_writes = False |
| 895 | alert = Alert().create(alertDescription, AlertLevel.fatal) |
| 896 | for result in self._sendMsg(alert): |
| 897 | yield result |
| 898 | self._shutdown(False) |
| 899 | raise TLSLocalAlert(alert, errorStr) |
| 900 | |
| 901 | def _sendMsgs(self, msgs): |
| 902 | # send messages together in a single TCP write |
no test coverage detected