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

Method sendfile

Lib/ssl.py:1268–1276  ·  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

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
1270 clear-text socket. Return the total number of bytes sent.
1271 """
1272 if self._sslobj is not None:
1273 return self._sendfile_use_send(file, offset, count)
1274 else:
1275 # os.sendfile() works with plain sockets only
1276 return super().sendfile(file, offset, count)
1277
1278 def recv(self, buflen=1024, flags=0):
1279 self._checkClosed()

Callers 3

_fastcopy_sendfileFunction · 0.45
stdlib_os.pyFile · 0.45
stdlib_socket.pyFile · 0.45

Calls 2

superClass · 0.85
_sendfile_use_sendMethod · 0.80

Tested by

no test coverage detected