MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / sendfile

Method sendfile

tools/python-3.11.9-amd64/Lib/ssl.py:1278–1286  ·  view source on GitHub ↗

Send a file, possibly by using os.sendfile() if this is a clear-text socket. Return the total number of bytes sent.

(self, file, offset=0, count=None)

Source from the content-addressed store, hash-verified

1276 return super().sendall(data, flags)
1277
1278 def sendfile(self, file, offset=0, count=None):
1279 """Send a file, possibly by using os.sendfile() if this is a
1280 clear-text socket. Return the total number of bytes sent.
1281 """
1282 if self._sslobj is not None:
1283 return self._sendfile_use_send(file, offset, count)
1284 else:
1285 # os.sendfile() works with plain sockets only
1286 return super().sendfile(file, offset, count)
1287
1288 def recv(self, buflen=1024, flags=0):
1289 self._checkClosed()

Callers 1

_fastcopy_sendfileFunction · 0.45

Calls 1

_sendfile_use_sendMethod · 0.80

Tested by

no test coverage detected