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

Method sendall

Lib/ssl.py:1292–1306  ·  view source on GitHub ↗
(self, data, flags=0)

Source from the content-addressed store, hash-verified

1290 self.__class__)
1291
1292 def sendall(self, data, flags=0):
1293 self._checkClosed()
1294 if self._sslobj is not None:
1295 if flags != 0:
1296 raise ValueError(
1297 "non-zero flags not allowed in calls to sendall() on %s" %
1298 self.__class__)
1299 count = 0
1300 with memoryview(data) as view, view.cast("B") as byte_view:
1301 amount = len(byte_view)
1302 while count < amount:
1303 v = self.send(byte_view[count:])
1304 count += v
1305 else:
1306 return super().sendall(data, flags)
1307
1308 def sendfile(self, file, offset=0, count=None):
1309 """Send a file, possibly by using an efficient sendfile() call if

Callers 11

sendMethod · 0.45
_putlineMethod · 0.45
putlineMethod · 0.45
abortMethod · 0.45
storbinaryMethod · 0.45
storlinesMethod · 0.45
abortMethod · 0.45
sendMethod · 0.45
_sendMethod · 0.45
send_interruptMethod · 0.45
writeMethod · 0.45

Calls 4

_checkClosedMethod · 0.95
sendMethod · 0.95
superClass · 0.85
castMethod · 0.80

Tested by

no test coverage detected