MCPcopy
hub / github.com/XX-net/XX-Net / _sendError

Method _sendError

code/default/lib/noarch/tlslite/tlsrecordlayer.py:891–899  ·  view source on GitHub ↗
(self, alertDescription, errorStr=None)

Source from the content-addressed store, hash-verified

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

Callers 15

_handle_phaMethod · 0.95
_handle_srv_phaMethod · 0.95
_getMsgMethod · 0.95
_clientGetServerHelloMethod · 0.80
_clientTLS13HandshakeMethod · 0.80
_clientResumeMethod · 0.80
_clientKeyExchangeMethod · 0.80

Calls 6

_sendMsgMethod · 0.95
_shutdownMethod · 0.95
AlertClass · 0.85
TLSLocalAlertClass · 0.85
flushMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected