MCPcopy Index your code
hub / github.com/RustPython/RustPython / sendall

Method sendall

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

Source from the content-addressed store, hash-verified

1250 self.__class__)
1251
1252 def sendall(self, data, flags=0):
1253 self._checkClosed()
1254 if self._sslobj is not None:
1255 if flags != 0:
1256 raise ValueError(
1257 "non-zero flags not allowed in calls to sendall() on %s" %
1258 self.__class__)
1259 count = 0
1260 with memoryview(data) as view, view.cast("B") as byte_view:
1261 amount = len(byte_view)
1262 while count < amount:
1263 v = self.send(byte_view[count:])
1264 count += v
1265 else:
1266 return super().sendall(data, flags)
1267
1268 def sendfile(self, file, offset=0, count=None):
1269 """Send a file, possibly by using os.sendfile() if this is a

Callers 9

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

Calls 5

_checkClosedMethod · 0.95
sendMethod · 0.95
lenFunction · 0.85
superClass · 0.85
castMethod · 0.45

Tested by

no test coverage detected