MCPcopy Index your code
hub / github.com/python/cpython / _write_appdata

Method _write_appdata

Lib/asyncio/sslproto.py:678–700  ·  view source on GitHub ↗
(self, list_of_data)

Source from the content-addressed store, hash-verified

676 # Outgoing flow
677
678 def _write_appdata(self, list_of_data):
679 if (
680 self._state in (
681 SSLProtocolState.FLUSHING,
682 SSLProtocolState.SHUTDOWN,
683 SSLProtocolState.UNWRAPPED
684 )
685 ):
686 if self._conn_lost >= constants.LOG_THRESHOLD_FOR_CONNLOST_WRITES:
687 logger.warning('SSL connection is closed')
688 self._conn_lost += 1
689 return
690
691 for data in list_of_data:
692 self._write_backlog.append(data)
693 self._write_buffer_size += len(data)
694
695 try:
696 if self._state == SSLProtocolState.WRAPPED:
697 self._do_write()
698
699 except Exception as ex:
700 self._fatal_error(ex, 'Fatal error on SSL protocol')
701
702 def _do_write(self):
703 try:

Callers 2

writeMethod · 0.80
writelinesMethod · 0.80

Calls 4

_do_writeMethod · 0.95
_fatal_errorMethod · 0.95
warningMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected